What is recursion? How do you write recursive functions? Does it work with laziness? How is it different from a `for` loop? All of these questions are answered, and more, using simple, clear examples. You’ll never have fear of recursion again.
Screencasts, Whiteboards, and Slides produced to help you learn
Reduce is the most powerful functional tool available. It lets you build general-purpose recursive solutions without doing the recursion yourself. In this course, we implement reduce and other functions like map and filter using it. This course also goes over some practical things you can do with reduce.
Curated selections of courses on a specific topic
Clojure can be an excellent language to learn programming. The following courses should set you on a good path for getting up to speed in Clojure. Be sure to click those checkmarks to track your progress. Start with the best introduction to Clojure out there. It gently guides you through the language with fun exercises. […]
If you’re coming to Clojure from an Object-Oriented Programming background, this page is for you. Be sure to click those checkmarks to track your progress. Start with the best introduction to Clojure out there. It gently guides you through the language with fun exercises. You’ll learn the syntax and the thought processes behind Clojure programming. […]
If you’re looking to watch absolutely all of the courses on this site, I’ve put together a suggested order. Start at the beginning and just watch everything straight through. Be sure to click those checkmarks to track your progress.
Parts of courses on specific topics
Like we said before, reduce is kind of a universal recursion over lists. We can implement a function to calculate the average using reduce.
In the third lesson in Recursion 101, we define another common recursive function, filter. This lesson includes a video screencast and some code. The lesson is 3 minutes long.
In the fifth lesson in Recursion 101, we rewrite filter to be tail recursive. This lesson includes a video screencast and some code. The lesson is 8 minutes long.
In the eighth lesson in Recursion 101, we look back on the three parts of all recursions and compare it to the elements of a for loop. This lesson includes a video screencast. The lesson is 5 minutes long.
In this lesson we implement filter using reduce.
It is entirely possible to implement map using reduce. We do that in this lesson.