On Thursday, June 7, 2012 1:53:30 PM UTC-4, Tom Hume wrote: > > Hi > > I'm trying to generate a sequence which corresponds to a breadth-first > search of a very wide, deep tree... and I'm hitting memory problems when I > go too far along the sequence. Having asked around on the IRC channel and > looked here, the number 1 cause of such problems is inadvertently holding > onto the head; but I can't see where I'm doing this. > > (dorun (take 20000000 (add-layer))) > take holds on to the head, because that is what it returns. Try changing take to drop.
- Chris -- 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