Next: , Previous: , Up: kmp   [Index]


29.2 Conventions

The following conventions for arguments documentation hold:

pattern

It is the sequence of elements to search for. It must support random access by indexing.

pattern-start
pattern-past

The half–open range of elements in pattern to search for. pattern-start is the index of the first (included) element; pattern-past is the index of the last (excluded) element.

text

It is a fixed sequence in which to do the search. It must support random access by indexing.

text-start
text-past

The half–open range of elements in text in which to do the search. text-start is the index of the first (included) element; text-past is the index of the last (excluded) element.

item=

It is an equality function used to construct the restart vector; for characters it is typically char=? or char-ci=?, while for numbers it is =.

item-ref

It is an element extraction function to be applied to pattern to retrieve an element by index; if pattern is a string, it is string-ref; if pattern is a vector it is vector-ref; if pattern is a list it is list-ref.

restart-vector

It is the KMP restart vector for pattern, as constructed by %kmp-make-restart-vector.