Sets the result in this buffer to a tail call of
target with the contents
of the collection
args used as call arguments.
This equivalent to the assignment of return values by the Lua statement
return target(a_0, ..., a_n)
where
a_i denotes the value returned by the
(i+1)-th invocation
of an iterator on
args, and
n is equal to
args.size() - 1.
Note, however, that this method is not a control statement that it does not
evaluate the call, but rather stores into the buffer a description of how the call
should be made. (In order to execute such a call in a non-tail-call setting, use
Dispatch#call(ExecutionContext,Object,Object[]).)
The contents of
args are not modified by the buffer, and the reference
to
args is not retained by the buffer. (In other words,
implementations of the
ReturnBuffer interface are required to make copy of
args's contents.)
The effect of this method is equivalent to
setToTailCallWithContentsOf(target, args.toArray())
However, implementations of this method may be expected to iterate over the
elements of
collection directly (i.e, avoiding the conversion to array).
For tail calls with a fixed number of arguments known at compile time, it is
recommended to use the appropriate
setToCall(...) method.