deep-filter ( ... obj quot: ( ... elt -- ... ? ) -- ... seq )
Factor handbook » The language » Collections » Sequence operations » Deep sequence combinators

Prev:deep-map ( ... obj quot: ( ... elt -- ... elt' ) -- ... newobj )
Next:deep-find ( ... obj quot: ( ... elt -- ... ? ) -- ... elt )


Vocabulary
sequences.deep

Inputs
objan object
quota quotation with stack effect ( ... elt -- ... ? )


Outputs
seqa sequence


Word description
Creates a sequence of sub-nodes in the object which satisfy the given quotation, in preorder. This includes the object itself, if it passes the quotation.

See also
filter

Definition


: deep-filter
( ... obj quot: ( ... elt -- ... ? ) -- ... seq )
over [ branch? ] 1guard deep-filter-as ; inline