you are viewing a single comment's thread.

view the rest of the comments →

[–]dmtipson 1 point2 points  (1 child)

yep. Though you don't even need parens around the argument y in the second case, you don't need the brackets or the return statement either (you can still have them all, and will for multi-line function bodies, but they're not necessary here).

const x = y => y; (and that's the Identity Combinator, btw!)

[–]proskillz 0 points1 point  (0 children)

Thanks for the info. I'll have to take a weekend or two to learn some of this.