Syntax options

Howard Lovatt howard.lovatt at gmail.com
Tue Jun 21 01:07:14 PDT 2011


Yes - thanks for finding my mistake

On 21 June 2011 17:57, Steven Simpson <ss at comp.lancs.ac.uk> wrote:

> On 21/06/11 08:42, Howard Lovatt wrote:
> > I too like the Ali Ebrahimi form [...]:
> >
> > Expression form:
> >  Nilary example: -> 3
> >  Unary example: x -> x + 1
> >  Binary example: (x, y) -> x + y
> >  Curry example: x -> y -> x + y
> >
> > Statement form:
> >  Nilary example: -> { return 3; }
> >  Unary example: x -> { return x + 1; }
> >  Binary example: (x, y) -> {
> >     if (x) { return y + 1; }
> >     return y;
> >  }
> >  Curry example: x -> { y -> { return x + y; } }
>
> Shouldn't that be:
>
>  x -> { return y -> { return x + y; }; }
>
> ...for both to be in statement form (inserted return and semicolon)?  Or
> mixed one way:
>
>  x -> y -> { return x + y; }
>
> ...or the other:
>
>  x -> { return y -> x + y; }
>
>
>
>


-- 
  -- Howard.


More information about the lambda-dev mailing list