about summary refs log tree commit diff stats
path: root/edit
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-11-10 10:24:14 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-11-10 10:24:14 -0800
commitf116818c7c6e98a5d9bfa7058096b42df85d8e1c (patch)
treeba3458a0c51f67c27c7347b1c5f5be2fc33965e2 /edit
parentb771d375d3e11dcf3e6e55175f2ae128448177a7 (diff)
downloadmu-f116818c7c6e98a5d9bfa7058096b42df85d8e1c.tar.gz
3656
Periodic cleanup to replace 'reply' with 'return' everywhere in the
repo.

I use 'reply' for students to help reinforce the metaphor of function
calls as being like messages through a pipe. But that causes 'reply' to
get into my muscle memory when writing Mu code for myself, and I worry
that that makes Mu seem unnecessarily alien to anybody reading on
Github.

Perhaps I should just give it up? I'll try using 'return' with my next
student.
Diffstat (limited to 'edit')
-rw-r--r--edit/006-sandbox-copy.mu4
-rw-r--r--edit/007-sandbox-delete.mu2
-rw-r--r--edit/008-sandbox-edit.mu4
3 files changed, 5 insertions, 5 deletions
diff --git a/edit/006-sandbox-copy.mu b/edit/006-sandbox-copy.mu
index e3f7fe55..c966ae78 100644
--- a/edit/006-sandbox-copy.mu
+++ b/edit/006-sandbox-copy.mu
@@ -146,7 +146,7 @@ def should-attempt-copy? click-row:num, click-column:num, env:&:environment -> r
   load-ingredients
   # are we below the sandbox editor?
   click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env
-  reply-unless click-sandbox-area?, 0/false
+  return-unless click-sandbox-area?, 0/false
   # narrower, is the click in the columns spanning the 'copy' button?
   first-sandbox:&:editor <- get *env, current-sandbox:offset
   assert first-sandbox, [!!]
@@ -154,7 +154,7 @@ def should-attempt-copy? click-row:num, click-column:num, env:&:environment -> r
   sandbox-right-margin:num <- get *first-sandbox, right:offset
   _, _, copy-button-left:num, copy-button-right:num, _ <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin
   copy-button-vertical-area?:bool <- within-range? click-column, copy-button-left, copy-button-right
-  reply-unless copy-button-vertical-area?, 0/false
+  return-unless copy-button-vertical-area?, 0/false
   # finally, is sandbox editor empty?
   current-sandbox:&:editor <- get *env, current-sandbox:offset
   result <- empty-editor? current-sandbox
diff --git a/edit/007-sandbox-delete.mu b/edit/007-sandbox-delete.mu
index c7c01451..555d2859 100644
--- a/edit/007-sandbox-delete.mu
+++ b/edit/007-sandbox-delete.mu
@@ -84,7 +84,7 @@ def should-attempt-delete? click-row:num, click-column:num, env:&:environment ->
   load-ingredients
   # are we below the sandbox editor?
   click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env
-  reply-unless click-sandbox-area?, 0/false
+  return-unless click-sandbox-area?, 0/false
   # narrower, is the click in the columns spanning the 'copy' button?
   first-sandbox:&:editor <- get *env, current-sandbox:offset
   assert first-sandbox, [!!]
diff --git a/edit/008-sandbox-edit.mu b/edit/008-sandbox-edit.mu
index 5ca39e14..dcd0967d 100644
--- a/edit/008-sandbox-edit.mu
+++ b/edit/008-sandbox-edit.mu
@@ -141,7 +141,7 @@ def should-attempt-edit? click-row:num, click-column:num, env:&:environment -> r
   load-ingredients
   # are we below the sandbox editor?
   click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env
-  reply-unless click-sandbox-area?, 0/false
+  return-unless click-sandbox-area?, 0/false
   # narrower, is the click in the columns spanning the 'edit' button?
   first-sandbox:&:editor <- get *env, current-sandbox:offset
   assert first-sandbox, [!!]
@@ -149,7 +149,7 @@ def should-attempt-edit? click-row:num, click-column:num, env:&:environment -> r
   sandbox-right-margin:num <- get *first-sandbox, right:offset
   edit-button-left:num, edit-button-right:num, _ <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin
   edit-button-vertical-area?:bool <- within-range? click-column, edit-button-left, edit-button-right
-  reply-unless edit-button-vertical-area?, 0/false
+  return-unless edit-button-vertical-area?, 0/false
   # finally, is sandbox editor empty?
   current-sandbox:&:editor <- get *env, current-sandbox:offset
   result <- empty-editor? current-sandbox