Handbook
Glossary
sequence= ( seq1 seq2 -- ? )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Comparing sequences
Next:
mismatch ( seq1 seq2 -- i )
Vocabulary
sequences
Inputs
seq1
a
sequence
seq2
a
sequence
Outputs
?
a
boolean
Word description
Tests if the two sequences have the same length and elements. This is weaker than
=
, since it does not ensure that the sequences are instances of the same class.
Definition
USING:
kernel
sequences.private
;
IN:
sequences
:
sequence=
( seq1 seq2 -- ? )
[
2length
dupd
=
]
2check
[
mismatch-unsafe
not
]
[
3drop
f
]
if
;
inline