Created
November 23, 2016 17:29
-
-
Save RutledgePaulV/45f0bebf28e79e585131cc422d945740 to your computer and use it in GitHub Desktop.
A macro for wrapping execution of a single form such that the form is not evaluated and nil is returned when given any nil arguments
This file contains 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
(defmacro ? [form] | |
(let [f (first form) args (rest form)] | |
`(let [_# (list ~@args)] | |
(when (every? some? _#) | |
(apply ~f _#))))) |
Author
RutledgePaulV
commented
Nov 23, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment