Handbook
Glossary
(take-until) ( state delimiter accum -- string/f state' )
Vocabulary
farkup
Inputs
state
an
object
delimiter
an
object
accum
an
object
Outputs
string/f
an
object
state'
an
object
Definition
USING:
kernel
sequences
splitting
;
IN:
farkup
::
(take-until)
( state delimiter accum -- string/f state' )
state
empty?
[
accum
join-lines
f
]
[
state
unclip-slice
:>
( rest first ) first delimiter
split1
:>
( before after ) before accum
push
after
[
accum
join-lines
rest after
prefix
]
[
rest delimiter accum
(take-until)
]
if
]
if
;