Hi! How would you solve such problem: I have a collection of pairs (key, value) -> [ [ "tom" 32 ] [ "tom" 2333 ] [ "anne" 12 ] [ "anne" 55 ] ]
As you can see keys can occur more than once, also that collection is very large so it should be evaluated lazily (for example the collection cames from stream input). I have function with two arguments key and sequence of its values, the pseudo code would be: callbackListener(string key, iterator values) now I would like get such effect that callbackListener will be called twice for the example collection. once with "tom" and iterator (or a lazy seq) to lazy evaluated collection of (32 and 2333) and second with "anne" and iterator for collection of (12 and 55) In Java it is easy because the language is imperative. But how about such logic in Clojure? Note that all must be evaluated lazily. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---