diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b397328bc0..321da32bf0 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1047,7 +1047,8 @@ expr8(expr1, ...) |Funcref| function call When expr8 is a |Funcref| type variable, invoke the function it refers to. -expr8->name([args]) method call *method* +expr8->name([args]) method call *method* *->* +expr8->{lambda}([args]) For methods that are also available as global functions this is the same as: > name(expr8 [, args]) @@ -1057,6 +1058,9 @@ This allows for chaining, passing the value that one method returns to the next method: > mylist->filter(filterexpr)->map(mapexpr)->sort()->join() < +Example of using a lambda: > + GetPercentage->{x -> x * 100}()->printf('%d%%') + *E274* "->name(" must not contain white space. There can be white space before the "->" and after the "(", thus you can split the lines like this: > |