Add "arity" getter to Fn.

This commit is contained in:
Bob Nystrom
2015-01-23 20:33:05 -08:00
parent c3a858a2c7
commit efd161cea2
7 changed files with 46 additions and 28 deletions
+8
View File
@@ -18,6 +18,14 @@ you create a "bare" function when you don't want to immediately pass it as a
It is a runtime error if `block` is not a function.
### **arity**
The number of arguments the function requires.
:::dart
IO.print(new Fn {}.arity) // 0.
IO.print(new Fn {|a, b, c| a }.arity) // 3.
### **call**(args...)
**TODO**