Skip to content

Commit 81b0d3a

Browse files
authored
Correct complexity statement for Sequence compactMap
1 parent e9fb909 commit 81b0d3a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/public/core/SequenceAlgorithms.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,7 @@ extension Sequence {
787787
/// - Returns: An array of the non-`nil` results of calling `transform`
788788
/// with each element of the sequence.
789789
///
790-
/// - Complexity: O(*m* + *n*), where *n* is the length of this sequence
791-
/// and *m* is the length of the result.
790+
/// - Complexity: O(*n*), where *n* is the length of this sequence.
792791
@inlinable // protocol-only
793792
public func compactMap<ElementOfResult>(
794793
_ transform: (Element) throws -> ElementOfResult?

0 commit comments

Comments
 (0)