typealias Zip2Sequence.Element
A type representing the sequence’s elements.
このシーケンスの持つ要素を表している型。
Availability
Technology
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.
Zip2Sequence
インスタンスにおいて、i番目の対に属する要素らは、基盤となるシーケンスそれぞれのi番目の要素です。Zip2Sequence
インスタンスを作成するには、zip(_:
関数を使ってください。
The following example uses the zip(_:
function to iterate over an array of strings and a countable range at the same time:
以下の例はzip(_:
関数を使って、同時に文字列からなる配列とある可付番範囲の全体にわたって反復します:
typealias Zip2Sequence.Element
var lazy: LazySequence<Zip2Sequence<Sequence1, Sequence2>>
map
and filter
, are implemented lazily.
このシーケンスと同じ要素を含んでいるシーケンス、しかしそれの上で何らかの演算、例えばmap
やfilter
が遅延に実装されます。
var underestimatedCount : Int
func allSatisfy (((Sequence1.Element, Sequence2.Element)) -> Bool) -> Bool
func compactMap <ElementOfResult>(((Sequence1.Element, Sequence2.Element)) -> ElementOfResult?) -> [ElementOfResult]
nil
results of calling the given transformation with each element of this sequence.
指定された変換をこのシーケンスの各要素で呼び出す結果で非-nil
のものを含んでいる配列を返します。
func contains(where: ((Sequence1.Element, Sequence2.Element)) -> Bool) -> Bool
func drop(while: ((Sequence1.Element, Sequence2.Element)) -> Bool) -> DropWhileSequence<Zip2Sequence<Sequence1, Sequence2>>
func dropFirst (Int) -> DropFirstSequence<Zip2Sequence<Sequence1, Sequence2>>
func dropLast (Int) -> [(Sequence1.Element, Sequence2.Element)]
func elementsEqual <OtherSequence>(OtherSequence, by: ((Sequence1.Element, Sequence2.Element), OtherSequence.Element) -> Bool) -> Bool
func enumerated() -> EnumeratedSequence<Zip2Sequence<Sequence1, Sequence2>>
func filter(((Sequence1.Element, Sequence2.Element)) -> Bool) -> [(Sequence1.Element, Sequence2.Element)]
func first(where: ((Sequence1.Element, Sequence2.Element)) -> Bool) -> (Sequence1.Element, Sequence2.Element)?
func flatMap <SegmentOfResult>(((Sequence1.Element, Sequence2.Element)) -> SegmentOfResult) -> [SegmentOfResult.Element]
func flatMap <ElementOfResult>(((Sequence1.Element, Sequence2.Element)) -> ElementOfResult?) -> [ElementOfResult]
nil
results of calling the given transformation with each element of this sequence.
指定された変換をこのシーケンスの各要素で呼び出す結果で非-nil
のものを含んでいる配列を返します。
func forEach (((Sequence1.Element, Sequence2.Element)) -> Void)
for
-in
loop.
指定されたクロージャをそのシーケンスの各要素上でfor
-in
ループと同じ順番で呼び出します。
func lexicographicallyPrecedes <OtherSequence>(OtherSequence, by: ((Sequence1.Element, Sequence2.Element), (Sequence1.Element, Sequence2.Element)) -> Bool) -> Bool
func makeIterator () -> Zip2Sequence<Sequence1, Sequence2>.Iterator
func map<T>(((Sequence1.Element, Sequence2.Element)) -> T) -> [T]
func max(by: ((Sequence1.Element, Sequence2.Element), (Sequence1.Element, Sequence2.Element)) -> Bool) -> (Sequence1.Element, Sequence2.Element)?
func min(by: ((Sequence1.Element, Sequence2.Element), (Sequence1.Element, Sequence2.Element)) -> Bool) -> (Sequence1.Element, Sequence2.Element)?
func prefix(Int) -> PrefixSequence<Zip2Sequence<Sequence1, Sequence2>>
func prefix(while: ((Sequence1.Element, Sequence2.Element)) -> Bool) -> [(Sequence1.Element, Sequence2.Element)]
func reduce<Result>(Result, (Result, (Sequence1.Element, Sequence2.Element)) -> Result) -> Result
func reduce<Result>(into: Result, (inout Result, (Sequence1.Element, Sequence2.Element)) -> ()) -> Result
func reversed() -> [(Sequence1.Element, Sequence2.Element)]
func shuffled() -> [(Sequence1.Element, Sequence2.Element)]
func shuffled<T>(using: inout T) -> [(Sequence1.Element, Sequence2.Element)]
func sorted(by: ((Sequence1.Element, Sequence2.Element), (Sequence1.Element, Sequence2.Element)) -> Bool) -> [(Sequence1.Element, Sequence2.Element)]
func split(maxSplits : Int, omittingEmptySubsequences : Bool, whereSeparator : ((Sequence1.Element, Sequence2.Element)) -> Bool) -> [ArraySlice<(Sequence1.Element, Sequence2.Element)>]
func starts<PossiblePrefix>( with: PossiblePrefix, by: ((Sequence1.Element, Sequence2.Element), PossiblePrefix.Element) -> Bool) -> Bool
func suffix(Int) -> [(Sequence1.Element, Sequence2.Element)]
func withContiguousStorageIfAvailable <R>((UnsafeBufferPointer<(Sequence1.Element, Sequence2.Element)>) -> R) -> R?
struct Zip2Sequence.Iterator
Zip2Sequence
.
Zip2Sequence
のためのイテレータ。
struct CollectionDifference
struct DropFirstSequence
n
elements from an underlying Base
iterator before possibly returning the first available element.
おそらくは最初の利用可能な要素が返る前にn
個の要素をある基礎をなすBase
イテレータから遅延に消費して落とすあるシーケンス。
struct DropWhileSequence
n
elements from an underlying Base
iterator before possibly returning the first available element.
おそらくは最初の利用可能な要素が返る前にn
個の要素をある基礎をなすBase
イテレータから遅延に消費して落とすあるシーケンス。
struct EnumeratedSequence
struct FlattenSequence
Base
sequence.
何らかのBase
シーケンスに含まれる各断片の中に含まれるいくらかの要素から成るシーケンス。
struct JoinedSequence
struct PrefixSequence
n
elements from an underlying Base
iterator.
最大でn
個の要素まで基礎をなすBase
イテレータからただ消費しきるあるシーケンス。
struct Repeated
struct ReversedCollection
struct StrideTo
struct StrideThrough
struct UnfoldSequence