Last active
December 24, 2015 17:16
-
-
Save ykochi/92feedd04a283ab6698e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun ->-helper (forms) | |
| (if (null forms) | |
| nil | |
| (let ((form (first forms)) | |
| (first-form (->-helper (rest forms)))) | |
| (if first-form | |
| (append (list (first form)) | |
| (list first-form) | |
| (rest form)) | |
| form)))) | |
| (defmacro -> (&rest forms) | |
| (->-helper (reverse forms))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment