Sequence operations
Up:Collections, The language, Factor handbook
Next:Virtual sequences

A sequence is a finite, linearly-ordered collection of elements. Words for working with sequences are in the sequences vocabulary.

Sequences implement a protocol:
Sequence protocol
The f object as a sequence
Sequence utility words can operate on any object whose class implements the sequence protocol. Most implementations are backed by storage. Some implementations obtain their elements from an underlying sequence, or compute them on the fly. These are known as Virtual sequences.
Accessing sequence elements
Sequence combinators
Adding and removing sequence elements
Appending sequences
Subsequences and slices
Reshaping sequences
Testing sequences
Searching sequences
Comparing sequences
Splitting sequences
Groups and clumps
Destructive operations
Treating sequences as stacks
Sorting sequences
Binary search
Set-theoretic operations on sequences
Trimming sequences
Deep sequence combinators
Using sequences for looping:
Counted loops
Numeric ranges
For inner loops:
Unsafe sequence operations