Function types syntax
Neal Gafter
neal at gafter.com
Tue Jan 26 16:47:14 PST 2010
On Tue, Jan 26, 2010 at 5:17 AM, Peter Levart <peter.levart at marand.si>wrote:
> For example:
>
> #(String: int) stringLength = #(String s: int length) label:{
> if (s == null) { length =-1; break label; }
> length = s.length();
> };
>
Rather than introducing two different names and requiring separate
statements for assignment and break, you could combine them into one
construct:
#(String: int) stringLength = #int(String s) length: {
if (s == null) break length =-1;
length = s.length();
};
More information about the lambda-dev
mailing list