Thanks for all the tips, particularly on the subject refs and atoms- that makes things substantially simpler now. (Pointer math... Grrr...)
> I also wonder why you consider the construction of the network graph > (as above) to be an inherently stateful activity. And why you choose > to have those construction functions operating on a single global > variable. When constructing a map in Clojure, one uses functions that > take one immutable map as argument and return another immutable map, > the 'updated' version, as return value. In the same way, why not > design functions that take one immutable network graph as an argument > and return another? To some extent, that's what I plan to do- map the node-update function to the collection of nodes with each simulation step, and then swap that in as the network state afterward. But there are also certain aspects of functionality (particularly during testing,) such as changing input weights, that are simply less hassle if I handle them statefully. I don't have any definite training algorithm in mind yet- I mainly wanted to get to know the language by taking on a non-trivial and reasonably interesting project that I had some experience in. I do want to be able to insert/delete nodes fairly easily though, and I don't want to have to rely on strict layering, FWIW. Again, thanks for all the help. One last question, though- how would I apply the 'map' function to an actual associative mapping? I mean- (defn testFunc [x] (* x 2)) (println (map testFunc {:a 1 :b 2 :c 3})) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---