Skip to content

Instantly share code, notes, and snippets.

@aboekhoff
Created February 5, 2010 19:47
Show Gist options
  • Save aboekhoff/296147 to your computer and use it in GitHub Desktop.
Save aboekhoff/296147 to your computer and use it in GitHub Desktop.
(defmacro and-let
[bindings & body]
(if (seq bindings)
(let [[a b & cs] bindings]
`(when-let [~a ~b] (and-let ~cs ~@body)))
`(do ~@body))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment