diff --git a/docs/tutorial.md b/docs/tutorial.md index 983bf1a..0340cc8 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -318,6 +318,8 @@ one could be with ellipsis that means "the rest pf arguments as List": ### Using lambda as the parameter + // note that fun returns its last calculated value, + // in our case, result after in-place addition: fun mapValues(iterable, transform) { var result = [] for( x in iterable ) result += transform(x)