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:
2025-02-14 17:42:11 +00:00
parent 2c8b5e7110
commit 955e921f80

View File

@@ -84,7 +84,7 @@ arguments `LAMBDA-LIST' with body `BODY'."
"Given a sequence of FORMS, return a unary function which applies each form
sequentially"
`(lambda (x)
(->> x ,@(reverse forms))))
(->> x ,@forms)))
(defmacro alist-val (key alist)
"Helper macro for getting the value of KEY in ALIST."