On 19/06/12 13:27, Jim - FooBar(); wrote:
On 19/06/12 13:06, Tassilo Horn wrote:
But I don't think the above applies to your usecase. Can it be that the
function constructs the returned map by inspecting the value of some
ref/atom or the current-phase-of-moon or so? In that case, you can't
memoize the fn.
yes actually a particular slot returns a var that holds an atom...do
you mean that the same atom value will be returned forever even though
the actual atom will have been swapped! or resetted! ?
Jim
hmmmm I see what you mean...that specific atom slot indeed stops me from
memoizing...all the rest return essentially constants... how about if
wrap current-checkers with a fn literal #(current-checkers) ?
Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en