Handbook
Glossary
mismatch ( seq1 seq2 -- i )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Comparing sequences
Prev:
sequence= ( seq1 seq2 -- ? )
Next:
drop-prefix ( seq1 seq2 -- slice1 slice2 )
Vocabulary
sequences
Inputs
seq1
a
sequence
seq2
a
sequence
Outputs
i
an index
Word description
Compares pairs of elements up to the minimum of the sequences' lengths, outputting the first index where the two sequences have non-equal elements, or
f
if all tested elements were equal.
Definition
USING:
kernel
sequences.private
;
IN:
sequences
:
mismatch
( seq1 seq2 -- i )
[
min-length
]
2keep
mismatch-unsafe
;