Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created July 9, 2011 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amalloy/1073943 to your computer and use it in GitHub Desktop.
Save amalloy/1073943 to your computer and use it in GitHub Desktop.
(defmacro mylet [binding & body]
`((fn [~@(take-nth 2 binding)]
~@body)
~@(take-nth 2 (rest binding))))
(mylet [a 1 b 2]
(+ a b)) ;; 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment