文書   >   Swift 標準ライブラリ >     Collections   >   Sequence and Collection Protocols   >   Sequence   >   filter(_:)   >   filter(_:)
インスタンスメソッド
filter(_:)
isIncluded を満たす self の要素を返します。
宣言
func filter(_ isIncluded: @escaping (Self.Elements.Element) -> Bool) -> LazyFilterSequence<Self.Elements>
議論
結果の要素は、結果が使用されるとオンデマンドで計算されます。バッファリング記憶域は割り当てられず、各横断するステップでは、1 つ以上の基本要素で predicate を呼び出します。