[Grace-core] Syntax questions

Andrew P. Black black at cs.pdx.edu
Mon Nov 8 18:41:56 PST 2010


On 8 Nov 2010, at 18:30, James Noble wrote:

>> 2.  How do we write anonymous n-ary functions?  (x:S,...) => {...}    or    {(x:S,...) => ...}
>>   Proposed answer: (x:S,...) => {...}
> 
> That's OK sure - why not with arcs inside the braces without the parens?
> 

When I wrote my previous response, I didn't see what you were suggesting, Kim.

Don't the braces have to be around the outside, so say that the whole thing is a block/Lambda, or whatever we are calling them?

So why not, as James says

	{ x:S, y:T ⇒ body }

or, without types (which should be inferable, nu)

	{ x, y => body }

	

	Andrew



More information about the Grace-core mailing list