Skip to content

Instantly share code, notes, and snippets.

@pepijndevos
Created April 13, 2012 15:00
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 pepijndevos/2377464 to your computer and use it in GitHub Desktop.
Save pepijndevos/2377464 to your computer and use it in GitHub Desktop.
curry function
(defmacro cfn [args & body]
(if (next args)
`(fn [~(first args)] (cfn ~(rest args) ~@body))
`(fn [~@args] ~@body)))
(defn ccall [f & args]
(reduce #(%1 %2) f args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment