Handbook
Glossary
loop1 ( ..a quot: ( ..a -- ..a obj ? ) -- ..a obj )
Vocabulary
combinators
.
extras
Inputs
quot
a
quotation
with stack effect
( ..a -- ..a obj ? )
Outputs
obj
an
object
Word description
Similar to
loop
. Calls the the quotation repeatedly until it outputs
f
. While it does so, discards
obj
. When the loop finishes, leaves
obj
on the stack.
Definition
USING:
kernel
;
IN:
combinators.extras
:
loop1
( ..a quot: ( ..a -- ..a obj ? ) -- ..a obj )
[
call
]
keep
[
[
drop
]
]
dip
[
loop1
]
curry
compose
when
;
inline
recursive