Handbook
Glossary
reduce* ( seq identity quot: ( prev elt -- next ) -- result )
Vocabulary
models
.
combinators
.
private
Inputs
seq
an
object
identity
an
object
quot
a
quotation
with stack effect
( prev elt -- next )
Outputs
result
an
object
Definition
USING:
combinators
kernel
sequences
;
IN:
models.combinators.private
::
reduce*
( seq identity quot: ( prev elt -- next ) -- result )
seq
[
identity
]
[
unclip
identity
swap
quot ( prev elt -- next )
call-effect
quot
reduce*
]
if-empty
;
inline
recursive