group_map_reduce
Sequence.group_map_reduce
(K
type
:
property.orderable, B type
, M type
: container.Map K B, key_f Unary K T, f Unary B T, reduce_f Binary B B B) =>
M¶Type Parameters
type of the keys
the type of the map to create
0.099dev (GIT hash 9b94ad4b4a4bff2bf2be7d77be2c6e1fd7683c4d)
reduce elements within a group by first applying f and then using reduce_f to reduce
example: count occurrences of letters, numbers and other characters
=> {(digit => 2), (letter => 3), (other => 1)}