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