Skip to content

Commit 86c1abf

Browse files
committed
Remove _tupleMap
1 parent da8185e commit 86c1abf

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

Sources/Algorithms/Partition.swift

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ extension Sequence {
259259
}
260260
}
261261

262-
return _tupleMap((lhs, rhs), { Array($0) })
262+
return (
263+
Array(lhs),
264+
Array(rhs)
265+
)
263266
}
264267
}
265268

@@ -352,25 +355,3 @@ extension Collection {
352355
)
353356
}
354357
}
355-
356-
//===----------------------------------------------------------------------===//
357-
// _tupleMap(_:_:)
358-
//===----------------------------------------------------------------------===//
359-
360-
/// Returns a tuple containing the results of mapping the given closure over
361-
/// each of the tuple’s elements.
362-
/// - Parameters:
363-
/// - x: The tuple to transform
364-
/// - transform: A mapping closure. `transform` accepts an element of this
365-
/// sequence as its parameter and returns a transformed
366-
/// - Returns: A tuple containing the transformed elements of this tuple.
367-
@usableFromInline
368-
internal func _tupleMap<T, U>(
369-
_ x: (T, T),
370-
_ transform: (T) throws -> U
371-
) rethrows -> (U, U) {
372-
return (
373-
try transform(x.0),
374-
try transform(x.1)
375-
)
376-
}

0 commit comments

Comments
 (0)