As JS/ECMAScript gains more and more of a functional use, I've been really 
wanting a functional operator feature from JS for a while. If you aren't 
familiar with them, they are inspired from haskell along the lines of:

```js
let add1 = (+);  // This is the same as below
let add2 = (a, b) => a + b;
```

This definitely helps clear up verbosity in reduce statements and related 
functions. Another example would be for sorting:

```js
[1,4,3,6].sort((-));
```

While all operators (namely `=`) wouldn't work as functional operators, I think 
this would be a useful addition to the language.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to