Plaster

text
(defmacro -> (argument &rest functions) (reduce #'(lambda (arg fun) (if (listp fun) (destructuring-bind (fname &rest fargs) fun `(,fname ,arg ,@fargs)) `(,fun ,arg))) functions :initial-value argument)) (defmacro ->> (argument &rest functions) (reduce #'(lambda (arg fun) (if (listp fun) (destructuring-bind (fname &rest fargs) fun `(,fname ,@fargs ,arg)) `(,fun ,arg))) functions :initial-value argument))