`foo = x -> 2x` works. On Wed, Apr 6, 2016 at 9:30 AM, Didier Verna <[email protected]> wrote:
> > Just a thought, not important but only for the record. > > The long forms for function definition are nicely homogeneous: > > function foo(x) > 2x > end > > and > > function (x) > 2x > end > > > It's a shame that the short ones aren't. I understand that using > (x) = 2x > for anonymous functions could entail a syntactic collision with > multiple assignment / pattern matching / whateveryoucallit, so perhaps > defining short named function had better be done like this: > > foo(x) -> 2x > > -- > ELS'16 registration open! http://www.european-lisp-symposium.org > > Lisp, Jazz, Aïkido: http://www.didierverna.info >
