diff options
-rw-r--r-- | macros.lisp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/macros.lisp b/macros.lisp index 9ecf7ef..6630946 100644 --- a/macros.lisp +++ b/macros.lisp @@ -174,17 +174,17 @@ printed. But the next time only the return value is used. -(defmacro monadic ((&key (exit-when #'null) (exit-with #'identity)) init &rest functions) +(defmacro binding> ((&key (exit-when #'null) (exit-with #'identity)) init &rest functions) "A threading macro. Some examples: -(monadic () +(binding> () \"hey dude what's the big idea\" ; starting state #$(values (search \"the\" $s) $s) ; multiple-values are passed along as arguments #$(subseq $2 $1)) : returns the result of the last form should return \"the big idea\" -(monadic (:exit-with \"☹\") +(binding> (:exit-with \"☹\") \"hey dude what's the big idea?\" #$(values (search \"NOOOOOOPE\" $s) $s) #$(subseq $2 $1)) @@ -192,13 +192,13 @@ should return \"the big idea\" should return \"☹\". EXIT-WHEN should be a function, a predicate, that operates on the -first value returned from one of the forms. If non-NIL, the MONADIC +first value returned from one of the forms. If non-NIL, the BINDING> form returns by calling the EXIT-WITH function on the list of values returned the the most recently called function. e.g -(monadic (:exit-when #'evenp +(binding> (:exit-when #'evenp :exit-with #$(list* :failed $x)) 33 #$(+ 11 $x) |