Leave FORMS as is in $ operator.
`$` takes a list of forms and makes a unary function which applies them via `->>`. Previous definition reversed the forms supplied s.t. `$` was closer to the applicative operator in Haskell i.e. the function (<$> f g) is f(g(x)). But this version fits closer with the lower operator (->>) being used AND allows easier lifting from `->>` (which produces a value) to `$` (which produces a function).
This commit is contained in:
@@ -84,7 +84,7 @@ arguments `LAMBDA-LIST' with body `BODY'."
|
|||||||
"Given a sequence of FORMS, return a unary function which applies each form
|
"Given a sequence of FORMS, return a unary function which applies each form
|
||||||
sequentially"
|
sequentially"
|
||||||
`(lambda (x)
|
`(lambda (x)
|
||||||
(->> x ,@(reverse forms))))
|
(->> x ,@forms)))
|
||||||
|
|
||||||
(defmacro alist-val (key alist)
|
(defmacro alist-val (key alist)
|
||||||
"Helper macro for getting the value of KEY in ALIST."
|
"Helper macro for getting the value of KEY in ALIST."
|
||||||
|
|||||||
Reference in New Issue
Block a user