The call to vec isn't lazy (and makes no sense in the example). Remove the call to vec and the remaining calls to drop and range are lazy. You will probably also want to (set! *print-length* 10) or some such at the REPL.
Cheers, Stu > > Hi : > > I would like to know why > ( from > http://stackoverflow.com/questions/749911/how-can-i-leak-memory-in-clojure > ) > > (drop 999990 (vec (range 1000000))) would cause memory problem in > clojure and how to fix it? > Thanks > > Because I think my code might have similar problem of memory cannot > be released. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---