Short Comparing proposal

Claude Pache claude.pache at gmail.com
Fri Feb 3 20:49:55 UTC 2017


> Le 3 févr. 2017 à 21:05, Bob Myers <rtm at gol.com> a écrit :
> 
> If you're worried about short-circuiting, then
> 
> ```
> [() => a, () => b].some(x => c === x())
> ```

Even shorter: `(_ => _ === a || _ === b )(c)`

But more seriously: Now you have another issue, namely readability.

—Claude



More information about the es-discuss mailing list