mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Correct complexity statement for Sequence compactMap
This commit is contained in:
@@ -787,8 +787,7 @@ extension Sequence {
|
|||||||
/// - Returns: An array of the non-`nil` results of calling `transform`
|
/// - Returns: An array of the non-`nil` results of calling `transform`
|
||||||
/// with each element of the sequence.
|
/// with each element of the sequence.
|
||||||
///
|
///
|
||||||
/// - Complexity: O(*m* + *n*), where *n* is the length of this sequence
|
/// - Complexity: O(*n*), where *n* is the length of this sequence.
|
||||||
/// and *m* is the length of the result.
|
|
||||||
@inlinable // protocol-only
|
@inlinable // protocol-only
|
||||||
public func compactMap<ElementOfResult>(
|
public func compactMap<ElementOfResult>(
|
||||||
_ transform: (Element) throws -> ElementOfResult?
|
_ transform: (Element) throws -> ElementOfResult?
|
||||||
|
|||||||
Reference in New Issue
Block a user