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

Prev:Reshaping sequences
Next:Searching sequences


Testing for an empty sequence:
empty? ( seq -- ? )


Testing indices:
bounds-check? ( n seq -- ? )


Testing if a sequence contains an object:
member? ( elt seq -- ? )

member-eq? ( elt seq -- ? )


Testing if a sequence contains a subsequence:
head? ( seq begin -- ? )

tail? ( seq end -- ? )

subseq? ( subseq seq -- ? )

subseq-of? ( seq subseq -- ? )