#!/usr/local/bin/sbcl --script (defmacro ->helper (form forms git) (if (null forms) form `(let ((,git ,form)) ,(->helper (car forms) (cdr forms) git)))) (defmacro -> (form &rest forms) (->helper form forms (intern (symbol-name '#:it)))) (defun square (n) (* n n)) (defun add1 (n) (1+ n)) (princ (macroexpand-1 '(-> 5 (add1 it) (square it))))