diff options
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r-- | runtime/doc/builtin.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 50087db4ea..3ca6f04389 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2507,7 +2507,7 @@ funcref({name} [, {arglist}] [, {dict}]) Can also be used as a |method|: > GetFuncname()->funcref([arg]) < - *function()* *E700* *E922* *E923* + *function()* *partial* *E700* *E922* *E923* function({name} [, {arglist}] [, {dict}]) Return a |Funcref| variable that refers to function {name}. {name} can be the name of a user defined function or an @@ -2537,6 +2537,15 @@ function({name} [, {arglist}] [, {dict}]) < Invokes the function as with: > call Callback('one', 'two', 'name') +< With a |method|: > + func Callback(one, two, three) + ... + let Partial = function('Callback', ['two']) + ... + eval 'one'->Partial('three') +< Invokes the function as with: > + call Callback('one', 'two', 'three') + < The function() call can be nested to add more arguments to the Funcref. The extra arguments are appended to the list of arguments. Example: > |