3 ms·
Having the last line of a function always be returned was one of the stepping stones to functional programming for me as it was now finally concise to write pur
by toastal 6y ago
Having the last line of a function always be returned was one of the stepping stones to functional programming for me as it was now finally concise to write pure functions compared to pre-ES2015. Still post ES2015, if the arrow function body isn't a one-liner, you have to put back your curly braces and return keyword.
After a brief time in LiveScript, I've since mostly written in the ML families (Elm & PureScript) where this is the default behavior.
And I still like/use CSON over YAML in some cases.