Function listsubseq

Source
pub fn listsubseq(that: ListStr, this: ListStr) -> bool
Expand description

Determines whether all elements of the first sequence appear in order within the second sequence.

The function iterates over the second sequence while maintaining an iterator over the first sequence. For each element encountered in the second sequence, if it matches the next expected element from the first sequence, the iterator advances. The process terminates early and returns true if all elements of the first sequence have been matched; otherwise, it returns false.