minor tweak to docs

This commit is contained in:
James Strachan
2012-01-06 09:46:58 +00:00
parent 4627738ca4
commit ab47bee033
+1 -1
View File
@@ -85,7 +85,7 @@ inline fun <T> java.lang.Iterable<T>.foreach(operation: (element: T) -> Unit) {
* Folds all the values from from left to right using the initial value to perform the operation on sequential pairs of values
*
* For example to sum together all numeric values in a collection of numbers it would be
* {code}numbers.fold(0){(a, b) -> a + b}{code}
* {code}val total = numbers.fold(0){(a, b) -> a + b}{code}
*/
inline fun <T> java.lang.Iterable<T>.fold(initial: T, operation: (it: T, it2: T) -> T): T {
var answer = initial