A sequence of pairs built out of two underlying sequences.
SDK
Xcode 7.0+
Framework
Swift Standard Library
Declaration
Overview
In a Zip2Sequence instance, the elements of the ith pair are the ith elements of each underlying sequence. To create a Zip2Sequence instance, use the zip(_:_:) function.
The following example uses the zip(_:_:) function to iterate over an array of strings and a countable range at the same time:
Returns a Boolean value indicating whether this sequence and another sequence contain equivalent elements in the same order, using the given predicate as the equivalence test.
Returns a Boolean value indicating whether the sequence precedes another sequence in a lexicographical (dictionary) ordering, using the given predicate to compare elements.
Returns the longest possible subsequences of the sequence, in order, that don’t contain elements satisfying the given predicate. Elements that are used to split the sequence are not returned as part of any subsequence.
Returns a Boolean value indicating whether the initial elements of the sequence are equivalent to the elements in another sequence, using the given predicate as the equivalence test.
Call body(p), where p is a pointer to the collection’s contiguous storage. If no such storage exists, it is first created. If the collection does not support an internal representation in a form of contiguous storage, body is not called and nil is returned.