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