Handbook
Glossary
each-line ( ... from to quot: ( ... line -- ... ) -- ... )
Factor handbook
»
UI framework
»
Building user interfaces
»
Pre-made UI gadgets
»
Editor gadgets
»
Documents
Prev:
remove-doc-range ( from to document -- )
Next:
Document locations
Vocabulary
documents
Inputs
from
a non-negative integer
to
a non-negative integer
quot
a
quotation
with stack effect
( ... line -- ... )
Outputs
None
Word description
Applies the quotation to each line in the range.
Notes
The range is created by calling
<slice>
.
Errors
Throws an error if
from
or
to
is out of bounds.
Definition
USING:
kernel
ranges
sequences
;
IN:
documents
:
each-line
( ... from to quot: ( ... line -- ... ) -- ... )
2over
=
[
3drop
]
[
[
[
first
]
bi@
[a..b]
]
dip
each
]
if
;
inline