On Tue, Feb 11, 2014 at 12:33 PM, biscotte a la crevette <[email protected]> wrote: > I would like to suggest an alternative function declaration syntax rule : > http://pastebin.mozilla.org/4258633 > > That will lead to a way shorter function declaration (like Array [...] > and Object {...} does ) : > > long story short : <...> will be equivalent to function(...) > > Which mean : > > var print = <name,age>{ //eq. to var print = function(name,age){... > console.log("my name is " + name + " " + age + "y old.\n"); > } > > Human = <name,age=0>{ > this.age=age; > this.name=age; > this.toString=<>{ > return ... > }; > } > > And so, will work with anonymous function declaration (which was my main > goal). > > my_list.map(<val>{return val<0?-val:val;});//return absolut-ified array > content
Are you aware of the existing arrow functions? Using current ES6, your example would be written as: my_list.map(val=>val<0?-val:val); ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

