No no I tried that...the map has to be one of the first things in the
namespace. 2 of its keys call a specific fn that itself expects the map
as argument. everything I tried will either return 'stack overflow' (if
I try to def/declare) or a 'attempting to call unbound fn' (If i
defn/declare)...the only way is to have defn in both places...
Jim
On 19/06/12 13:30, Ambrose Bonnaire-Sergeant wrote:
On Tue, Jun 19, 2012 at 8:20 PM, Jim - FooBar(); <jimpil1...@gmail.com
<mailto:jimpil1...@gmail.com>> wrote:
On 19/06/12 13:06, Tassilo Horn wrote:
Well, if you memoize a fn of no args, it'll always return the same
value. If that's really what you want, I'd rather use
(def the-map (expr-calculating-the-map))
It needs to be a fn because a couple of slots in the map call a
specific fn that is not yet defined and I can't simply declare it
so i get error "attempting to call unbound fn"... I also cannot
rearrange the code cos the map is used all over the place - it
needs to be at the top of the namespace...
Could you (declare the-map) and then define it after the last
dependency is defined?
Thanks,
Ambrose
--
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 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