patch 8.1.1834: cannot use a lambda as a method
Problem: Cannot use a lambda as a method.
Solution: Implement ->{lambda}(). (closes #4768)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 2f35c7c..981121f 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1217,7 +1217,8 @@
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])
@@ -1227,6 +1228,9 @@
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: >