Re: Failed to parse the expression when we have repeated function invocations

2013-07-18 Thread Mark Thomas
On 18/07/2013 18:36, Mark Thomas wrote: > On 18/07/2013 18:24, Violeta Georgieva wrote: >> 2013/7/18 Mark Thomas wrote: >>> I look forward to your next brain teaser :) >>> >> >> ;) >> >> If I modify the example above like this >> >> f = ()->y->2-y; f()(1) > > Thanks for all the testing. > > I'll

Re: Failed to parse the expression when we have repeated function invocations

2013-07-18 Thread Mark Thomas
On 18/07/2013 18:24, Violeta Georgieva wrote: > 2013/7/18 Mark Thomas wrote: >> >> On 18/07/2013 08:00, Violeta Georgieva wrote: >>> Hi, >>> >>> Let's have a lambda expression: >>> >>> x->y->x-y >>> >>> Let's now assign it and invoke it indirectly: >>> >>> f = x->y->x-y; f(2)(1) >> >> Several probl

Re: Failed to parse the expression when we have repeated function invocations

2013-07-18 Thread Violeta Georgieva
2013/7/18 Mark Thomas wrote: > > On 18/07/2013 08:00, Violeta Georgieva wrote: > > Hi, > > > > Let's have a lambda expression: > > > > x->y->x-y > > > > Let's now assign it and invoke it indirectly: > > > > f = x->y->x-y; f(2)(1) > > Several problems here. > > 1. The grammar didn't support function

Re: Failed to parse the expression when we have repeated function invocations

2013-07-18 Thread Mark Thomas
On 18/07/2013 08:00, Violeta Georgieva wrote: > Hi, > > Let's have a lambda expression: > > x->y->x-y > > Let's now assign it and invoke it indirectly: > > f = x->y->x-y; f(2)(1) Several problems here. 1. The grammar didn't support functions having multiple sets of parameters. 2. The lambda

Failed to parse the expression when we have repeated function invocations

2013-07-18 Thread Violeta Georgieva
Hi, Let's have a lambda expression: x->y->x-y Let's now assign it and invoke it indirectly: f = x->y->x-y; f(2)(1) >From the spec we have: "If the result of evaluating the function name is a LambdaExpression, the LambdaExpression is invoked with the supplied arguments. If the result of evalua