[Ann] Grouper

Hello,

I made a small library that reify grouping (that one does via #groupBy: usually): Grouper https://github.com/juliendelplanque/Grouper

It is designed in the same spirit as SortFunction, but for grouping.

Quick example:

The following code snippet using Grouper:

(10 to: 50) groupUsing: [ :integer | integer asString first ].
"an OrderedDictionary(
  $1->#(10 11 12 13 14 15 16 17 18 19)
  $2->#(20 21 22 23 24 25 26 27 28 29)
  $3->#(30 31 32 33 34 35 36 37 38 39)
  $4->#(40 41 42 43 44 45 46 47 48 49)
  $5->#(50))"

Julien Delplanque

%d bloggers like this: