From de653b67fb6ca567346516ae9880766cb421d135 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 11 Feb 2025 00:27:51 +0000 Subject: Rework `$` operator to work like applicative in Haskell f $ g $ h -> f(g(h)) whereas previous implementation ($ f g h) was h(g(f)). --- lib.macros.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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." -- cgit v1.2.3-13-gbd6f