docs: clarify fiber call/resume semantics, fn arity error, and list insert negative index behavior

This commit is contained in:
Bob Nystrom
2015-04-22 14:45:20 +00:00
parent 6c66ce0e04
commit 2d2f083072
3 changed files with 41 additions and 10 deletions
+5 -4
View File
@@ -36,8 +36,9 @@ Invokes the function with the given arguments.
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 is less than the arity of
the function. If more arguments are given than the arity of the function they
will be discarded.
fn.call("Hello world") // Prints "Hello world".
It is a runtime error if the number of arguments given is less than the arity
of the function. If more arguments are given than the function's arity they are
ignored.