docs polishing
This commit is contained in:
parent
c167ebe6a8
commit
1323f93923
@ -318,6 +318,8 @@ one could be with ellipsis that means "the rest pf arguments as List":
|
|||||||
|
|
||||||
### Using lambda as the parameter
|
### 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) {
|
fun mapValues(iterable, transform) {
|
||||||
var result = []
|
var result = []
|
||||||
for( x in iterable ) result += transform(x)
|
for( x in iterable ) result += transform(x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user