stdlib: protocol extensions: de-underscore reduce()

Swift SVN r28237
This commit is contained in:
Dmitri Hrybenko
2015-05-07 00:30:25 +00:00
parent 035d72d5a7
commit 270ec3b67c
10 changed files with 14 additions and 76 deletions

View File

@@ -345,9 +345,9 @@ public func contains<
/// Return the result of repeatedly calling `combine` with an
/// accumulated value initialized to `initial` and each element of
/// `sequence`, in turn.
@availability(*, unavailable, message="call the 'reduce()' method on the sequence")
public func reduce<S : SequenceType, U>(
sequence: S, _ initial: U, @noescape _ combine: (U, S.Generator.Element) -> U
) -> U {
// FIXME(prext): remove this function when protocol extensions land.
return sequence._prext_reduce(initial, combine: combine)
return sequence.reduce(initial, combine: combine)
}