Idea for contrib.def: defmemo

18 views
Skip to first unread message

samppi

unread,
Jul 8, 2009, 11:53:27 PM7/8/09
to Clojure
In clojure.contrib.def, I'd love to have a defmemo macro that acts
just like defn, only with memoize. I'm planning to change a lot of
functions to use memoize, and I'm not looking forward to changing
nice, clean defns with docstrings to (def {:doc docstring} function
(memoize (fn ...)))s. Would this be useful for anyone else?

Chouser

unread,
Jul 9, 2009, 11:21:04 AM7/9/09
to Clojure

samppi

unread,
Jul 9, 2009, 11:49:47 AM7/9/09
to Clojure
Excellent. This will be a lifesaver—thanks a lot.
> http://www.assembla.com/spaces/clojure-contrib/tickets/5-def--Add-def...
>
> --Chouser
Reply all
Reply to author
Forward
0 new messages