2 ms·
Yet another validation of Greenspun's tenth rule. Now if only ES6 would get proper tail recursion then we'd be all set!
by taylodl 12y ago
Yet another validation of Greenspun's tenth rule. Now if only ES6 would get proper tail recursion then we'd be all set!
- ivank 12y agoI think these are in the spec. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tail-position-calls https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ta...
- jessaustin 12y agoIn that case, I'm shocked that no Lispers have showed up to castigate raganwald for writing something like fn(first, foldWith(fn, terminalValue, rest)); With an accumulator foldWith could call itself directly! b^) Actually this indicates to me that ES6 should implement folds itself.