aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-02-11 00:27:51 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-02-11 00:40:19 +0000
commitde653b67fb6ca567346516ae9880766cb421d135 (patch)
tree98acbedba49b0137884faa4c2fcac5743797c4ff
parentcb7dacccfaae7ea9e2e654bfedde6776435b7e84 (diff)
downloadcantedraw-de653b67fb6ca567346516ae9880766cb421d135.tar.gz
cantedraw-de653b67fb6ca567346516ae9880766cb421d135.tar.bz2
cantedraw-de653b67fb6ca567346516ae9880766cb421d135.zip
Rework `$` operator to work like applicative in Haskell
f $ g $ h -> f(g(h)) whereas previous implementation ($ f g h) was h(g(f)).
-rw-r--r--lib.macros.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.macros.lisp b/lib.macros.lisp
index a866193..6895885 100644
--- a/lib.macros.lisp
+++ b/lib.macros.lisp
@@ -82,7 +82,7 @@ arguments `LAMBDA-LIST' with body `BODY'."
"Given a sequence of FORMS, return a unary function which applies each form
sequentially"
`(lambda (x)
- (->> x ,@forms)))
+ (->> x ,@(reverse forms))))
(defmacro alist-val (key alist)
"Helper macro for getting the value of KEY in ALIST."