slice
Factor handbook > The language > Collections > Sequence operations > Subsequences and slices

Prev:cut* ( seq n -- before after )
Next:slice? ( object -- ? )


Vocabulary
sequences

Class description
A virtual sequence which presents a subrange of the elements of an underlying sequence. New instances can be created by calling <slice>. Convenience words are also provided for creating slices where one endpoint is the start or end of the sequence; see Subsequences and slices for a list.

Slices are mutable if the underlying sequence is mutable, and mutating a slice changes the underlying sequence. However, slices cannot be resized after creation.

Definition


Methods