Skip to content

Commit e78643c

Browse files
authored
Merge pull request #59143 from fulldecent/patch-1
Correct complexity statement for Sequence compactMap
2 parents 7c7fb47 + 81b0d3a commit e78643c

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)