@rauschma omitting parentheses is one of the nice syntax sugar I use in my JS code:
```js
const add = a => b => a+b
```
@rauschma omitting parentheses is one of the nice syntax sugar I use in my JS code:
```js
const add = a => b => a+b
```
#TypeScript: Arrow functions help with partial evaluation [1] – e.g. a factory for functions for which there already is a type. Then they are more elegant than using .bind() [2]
const functionFactory = (factoryArg: string): FunctionType => (functionArg) => { … }
Note that the type of `functionArg` and the result type of the second arrow function are provided by `FunctionType`.
[1] https://2ality.com/2011/09/currying-vs-part-eval.html
[2] https://2ality.com/2016/02/arrow-functions-vs-bind.html
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.