timoxley / functional-javascript-workshop

A functional javascript workshop. No libraries required (i.e. no underscore), just ES5.
2.06k stars 439 forks source link

ES6 Purely Functional Solution For Exercise #16 #193

Open RavenHursT opened 6 years ago

RavenHursT commented 6 years ago

The solution here contains some mutable variables and a for loop (.forEach()): https://github.com/timoxley/functional-javascript-workshop/blob/master/exercises/recursion/solution/solution.js

Just thought I'd submit my functional solution that came out a bit closer to a purely functional one: https://repl.it/@RavenHursT/Functional-JS-Workshop-Exercise-16-Solution