Hi,
On Nov 9, 3:14 pm, Michael Jaaka wrote:
> and the other question is if I have (def c [ [ 1 2 ] [ 3 4 ] ]) and want to
> get lazily [ 2 4 ] (values of tuplets of a sequence) will be this a correct
> (map #(-> % fnext) c ) way?
(map second c) is what you want. This is missing from my soluti
By the first I mean this done by Meikel Brandmeyer. However I will check
later also this one:
"(use '[clojure.contrib.seq-utils :only (partition-by)])
(map (comp callback-fn (fn [part] [(ffirst part) (map second part)]))
(partition-by first *s*))"
and the other question is if I have (def c [
Keys are always sorted. So once a key stops appearing it won't appear again.
The first solution seems to be the right one, because all values are
processed in a sequence manner in a lazy way.
2009/11/8 DTH
>
> On Nov 8, 12:33 pm, Michael Jaaka
> wrote:
> >
> > now I would like get such effect t
On Nov 8, 12:33 pm, Michael Jaaka
wrote:
>
> 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 collect
On Sun, Nov 8, 2009 at 7:33 AM, Michael Jaaka
wrote:
> 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
Hi,
Am 08.11.2009 um 13:33 schrieb Michael Jaaka:
> 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
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