Handbook
Glossary
1push-map-when ( ..a filter-quot: ( ..a -- ..b ? ) map-quot: ( ..a -- ..b obj ) accum -- ..b )
Vocabulary
sequences
.
extras
.
private
Inputs
filter-quot
a
quotation
with stack effect
( ..a -- ..b ? )
map-quot
a
quotation
with stack effect
( ..a -- ..b obj )
accum
an
object
Outputs
None
Definition
USING:
kernel
sequences
;
IN:
sequences.extras.private
:
1push-map-when
( ..a filter-quot: ( ..a -- ..b ? ) map-quot: ( ..a -- ..b obj ) accum -- ..b )
[
keep
over
]
2dip
[
when
]
dip
rot
[
push
]
[
2drop
]
if
;
inline