guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: monads: Use intent-revealing parameter names.


From: Ludovic Courtès
Subject: 01/03: monads: Use intent-revealing parameter names.
Date: Sat, 8 Apr 2017 08:41:00 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d922c8e4b773407ca525360e8c564484db34db07
Author: Chris Marusich <address@hidden>
Date:   Thu Apr 6 02:28:34 2017 -0700

    monads: Use intent-revealing parameter names.
    
    * guix/monads.scm (mwhen, munless): Rename parameters from 'exp0' and 'exp' 
to
      'mexp0' and 'mexp', respectively.  This makes it more obvious that these
      expressions must be monadic expressions.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 guix/monads.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/guix/monads.scm b/guix/monads.scm
index 0b0ad23..6933f7f 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -204,23 +204,23 @@ the last one."
 
 (define-syntax mwhen
   (syntax-rules ()
-    "When CONDITION is true, evaluate EXP0..EXP* as in an 'mbegin'.  When
+    "When CONDITION is true, evaluate MEXP0..MEXP* as in an 'mbegin'.  When
 CONDITION is false, return *unspecified* in the current monad."
-    ((_ condition exp0 exp* ...)
+    ((_ condition mexp0 mexp* ...)
      (if condition
          (mbegin %current-monad
-           exp0 exp* ...)
+           mexp0 mexp* ...)
          (return *unspecified*)))))
 
 (define-syntax munless
   (syntax-rules ()
-    "When CONDITION is false, evaluate EXP0..EXP* as in an 'mbegin'.  When
+    "When CONDITION is false, evaluate MEXP0..MEXP* as in an 'mbegin'.  When
 CONDITION is true, return *unspecified* in the current monad."
-    ((_ condition exp0 exp* ...)
+    ((_ condition mexp0 mexp* ...)
      (if condition
          (return *unspecified*)
          (mbegin %current-monad
-           exp0 exp* ...)))))
+           mexp0 mexp* ...)))))
 
 (define-syntax define-lift
   (syntax-rules ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]