On Thursday, February 14, 2013 7:44:18 PM UTC-5, Stephen Compall wrote: > On Feb 14, 2013 6:11 PM, "Jonathon McKitrick" > <jmcki...@gmail.com<javascript:>> > wrote: > > I have a loop over a function that is accumulating a list of database > keys for later use. But it is primarily doing other processing and > returning a collection of processed/filtered records. > > As you come from Common Lisp, where all standard library sequences are > strict, I think it will be more interesting for you to write a version of > your function that can work on infinite lists of records. > > The point is laziness, not that the function will ever receive an infinite > seq, but this is a good way to think about it. Consider that several > library functions, like map, filter, iterate, and take-while are all > lazy-friendly. >
I think that's my biggest challenge so far: thinking in terms of lazy sequences, and especially generating my own. I'm so used to just building a list and traversing it.... -- -- 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/groups/opt_out.