From 955e921f8056b4cc858ea9798a14b91486cf9036 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 14 Feb 2025 17:42:11 +0000 Subject: 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). --- lib.macros.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib.macros.lisp') diff --git a/lib.macros.lisp b/lib.macros.lisp index 70f5917..d182ce0 100644 --- a/lib.macros.lisp +++ b/lib.macros.lisp @@ -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." -- cgit v1.2.3-13-gbd6f