On Tuesday, December 9, 2014 7:19:27 PM UTC-5, Steven Yi wrote: > > Hi Andy, > > Just my two cents here, but I don't think memoize makes sense here myself > due to this not being referentially transparent, and I think Andrey's > comment on delays makes more sense to me. You could do something like this: > > (def conf (atom (delay (read-and-expensively-parse "somefile.xml")))) > > (defn config [] > @(deref conf)) >
Why not just @@conf? It seems to work at my REPL, at least, to unpeel two onion layers of indirection. -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.