How to assign the return value of a CIS
Gernot Neppert
mcnepp02 at googlemail.com
Fri Jan 8 04:13:45 PST 2010
Hello,
I'm wondering about how to assign the return value of a
ControlInvocationStatement to a variable.
Or can the return value of a CIS never be used if the special syntax
for such statements is used?
Example:
Given the declaration
<T,C extends Collection<? extends T>> C apply(C source, #void(T) f);
Can we invoke it like this:
List<T> target = apply(String s: Arrays.asList("One", "Two", "Three")
{
// do something with "s"
}
In particular: do we now need a semicolon and the end of the assignment?
More information about the closures-dev
mailing list