Handbook
Glossary
flatten ( obj -- seq )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Deep sequence combinators
Prev:
deep-map! ( ... obj quot: ( ... elt -- ... elt' ) -- ... obj )
Vocabulary
sequences
.
deep
Inputs
obj
an
object
Outputs
seq
a
sequence
Word description
Creates a sequence of all of the leaf nodes (non-sequence nodes, but including strings and numbers) in the object.
Definition
IN:
sequences.deep
:
flatten
( obj -- seq )
[
branch?
]
deep-reject
;