Handbook
Glossary
each-node ( ... nodes quot: ( ... node -- ... ) -- ... )
Vocabulary
compiler
.
tree
.
combinators
Inputs
nodes
an
object
quot
a
quotation
with stack effect
( ... node -- ... )
Outputs
None
Definition
USING:
accessors
combinators
compiler.tree
kernel
sequences
;
IN:
compiler.tree.combinators
::
each-node
( ... nodes quot: ( ... node -- ... ) -- ... )
nodes
[
quot
[
{
{
[
dup
#branch?
]
[
children>>
~quotation~
each
]
}
{
[
dup
#recursive?
]
[
child>>
quot
each-node
]
}
{
[
dup
#alien-callback?
]
[
child>>
quot
each-node
]
}
[
drop
]
}
cond
]
bi
]
each
;
inline
recursive