Handbook
Glossary
smart-2reduce ( 2reduce-quots -- quot )
Vocabulary
combinators
.
smart
Inputs
2reduce-quots
a
sequence
Outputs
None
Word description
A version of
2reduce
that takes a sequence of
{ identity 2reduce-quot }
pairs, returning the
2reduce
result for each pair.
Definition
USING:
assocs
generalizations
kernel
sequences
;
IN:
combinators.smart
MACRO:
smart-2reduce
( 2reduce-quots -- quot )
unzip
[
[
]
like
]
bi@
dup
length
dup
[
[
[
cleave-curry
]
[
cleave-curry
]
bi
]
curry
compose
]
dip
[
spread*
]
curry
compose
[
[
2dip
]
curry
]
dip
[
2each
]
curry
compose
;