#!/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)) (defun macroexpand-all (form) (let ((form (macroexpand form))) (cons (car form) (mapcar #'macroexpand (cdr form))))) (princ (-> 5 (add1 it) (square it)))