[stdlib] Doc comment reduce algorithm

Swift SVN r21206
This commit is contained in:
Dave Abrahams
2014-08-14 17:36:49 +00:00
parent 84abad0be4
commit 35d9fc22fa

View File

@@ -760,6 +760,9 @@ public func contains<
return contains(seq, { $0 == x })
}
/// Return the result of repeatedly calling `combine` with an
/// accumulated value initialized to `initial` and each element of
/// `sequence`, in turn.
public func reduce<S: SequenceType, U>(
sequence: S, initial: U, combine: (U, S.Generator.Element)->U
) -> U {