»
group_map_reduce
Sequence.group_map_reduce
(K
type
:
property.orderable, B type
, key_f Unary K Sequence.T, f Unary B Sequence.T, reduce_f Binary B B B) =>
container.Map K B¶Type Parameters
type of the keys
0.094dev (2025-07-10 15:41:47 GIT hash eafa42ae743de61b62f958948d7abb5fada7756f built by fridi@fzen)
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)}