Handbook
Glossary
flattener ( seq quot -- seq vector quot' )
Vocabulary
compiler
.
utilities
Inputs
seq
an
object
quot
an
object
Outputs
seq
an
object
vector
an
object
quot'
an
object
Definition
USING:
combinators.short-circuit
kernel
sequences
vectors
;
IN:
compiler.utilities
:
flattener
( seq quot -- seq vector quot' )
over
length
<vector>
[
dup
[
[
push-all
]
curry
]
dip
[
push
]
curry
[
[
[
dup
{
~quotation~ ~quotation~
}
1||
]
]
dip
]
dip
[
if
]
2curry
compose
[
when*
]
curry
compose
]
keep
;
inline