DEV Community


Discussion on: Memoization in a Nutshell

pieohpah profile image
Joe Chasinga Author

Yeah I was hoping es6 is closer to functional than this. The only way to get an implicit return from the last expression is a lambda function without brackets (containing a single expression).

let fun = () => 0;
fun()           // will return 0