Handbook
Glossary
smart-map-reduce ( map-reduce-quots -- quot )
Vocabulary
combinators
.
smart
Inputs
map-reduce-quots
a
sequence
Outputs
None
Word description
A version of
map-reduce
that takes a sequence of
{ map-quot reduce-quot }
pairs, returning the
map-reduce
result for each pair.
Definition
USING:
assocs
combinators
generalizations
kernel
sequences
;
IN:
combinators.smart
MACRO:
smart-map-reduce
( map-reduce-quots -- quot )
[
keys
]
[
[
[
]
concat-as
]
[
]
map-as
]
bi
dup
length
dup
[
[
[
first
]
]
dip
[
cleave
]
curry
compose
]
3dip
[
[
cleave-curry
]
curry
compose
]
dip
[
spread*
]
curry
compose
[
[
keep
]
curry
]
dip
[
1
each-from
]
curry
compose
;