mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
Add docs for fn.call.
This commit is contained in:
@ -30,4 +30,13 @@ The number of arguments the function requires.
|
||||
|
||||
### **call**(args...)
|
||||
|
||||
**TODO**
|
||||
Invokes the function with the given arguments.
|
||||
|
||||
:::dart
|
||||
var fn = new Fn { |arg|
|
||||
IO.print(arg)
|
||||
}
|
||||
fn.call("Hello world") // Hello world.
|
||||
|
||||
It is a runtime error if the number of arguments given does not equal the arity
|
||||
of the function.
|
||||
Reference in New Issue
Block a user