Sounds like a job for partition-by: http://clojuredocs.org/clojure_core/clojure.core/partition-by
On Mon, Aug 12, 2013 at 1:55 PM, Colin Yates <colin.ya...@gmail.com> wrote: > Is there such a thing as a lazy group-by for a sequence of elements when > the elements are sorted on the criteria used to group them? I can imagine > how one would look in a few lines of Clojure code but I am surprised there > isn't one already. > > My actual criteria is that I am pulling things from a database that live > on the "many" side of a one-many and I want to sort on the "one" FK. > > This is all based on the assumption that > http://clojuredocs.org/clojure_core/clojure.core/group-by is eager! > > -- > -- > 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. > > > -- -- 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.