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