Reshaping sequences
Factor handbook » The language » Collections » Sequence operations

Prev:Subsequences and slices
Next:Testing sequences


A repetition is a virtual sequence consisting of a single element repeated multiple times:
repetition

<repetition> ( len elt -- repetition )


Reversing a sequence:
reverse ( seq -- newseq )


A reversed is a virtual sequence presenting a reversed view of an underlying sequence:
reversed

<reversed> ( seq -- reversed )


Transposing a matrix:
flip ( matrix -- newmatrix )