Skip to content

Instantly share code, notes, and snippets.

@k2nr
Created December 13, 2012 14:44
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 k2nr/4276794 to your computer and use it in GitHub Desktop.
Save k2nr/4276794 to your computer and use it in GitHub Desktop.
define memoized function. It's useful for memoized recursion.
(defmacro defmemo
[name & fdecl]
`(def ~name
(memoize (fn ~fdecl))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment