Skip to content

Instantly share code, notes, and snippets.

@emidln
Created January 23, 2014 23:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emidln/8588652 to your computer and use it in GitHub Desktop.
Save emidln/8588652 to your computer and use it in GitHub Desktop.
when-let for hy
(defmacro/g! when-let [bindings &rest then]
(let [[form (first bindings)]
[tst (second bindings)]]
`(let [[~g!temp ~tst]]
(if ~g!temp
(let [[~form ~g!temp]]
(do
~@then))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment