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
froma non-negative integer
toa non-negative integer
quota 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


: each-line ( ... from to quot: ( ... line -- ... ) -- ... )
2over = [ 3drop ] [ [ [ first ] bi@ [a..b] ] dip each ] if ;
inline