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