head? ( seq begin -- ? )
Factor handbook » The language » Collections » Sequence operations » Testing sequences

Prev:member-eq? ( elt seq -- ? )
Next:tail? ( seq end -- ? )


Vocabulary
sequences

Inputs
seqa sequence
begina sequence


Outputs
?a boolean


Word description
Tests if seq starts with begin. If begin is longer than seq, this word outputs f.

Examples
USING: prettyprint sequences ; { "accept" "adept" "advance" "advice" "affect" } [ "ad" head? ] filter .
{ "adept" "advance" "advice" }


Definition