Re:What if you couldn’t program with loops?
by BalinKing on Monday July 15, 2019 @01:48AM
(#20438463)
This seems a bit worrying to me as a general principle, since Javascript's lack of tail call optimization (TCO) means that you can blow the stack pretty easily by manually recursing. Just my two cents :-)
[ Parent
| on HN ]
Re:What if you couldn’t program with loops?
by BalinKing on Monday July 15, 2019 @01:49AM
(#20438466)
(Out of curiosity, have you considered starting at raw recursion – like in your example – but then moving on to using utility functions like `map` from e.g. Ramda or lodash?)
Yes. curriculum starts off with recursion, then moves on to higher order functions and nobody touches recursion again.