In the second lesson in Recursion 101, we define another recursive function, map. This lesson includes a video screencast and some code. This lesson includes a video screencast and some code.
Parts of courses on specific topics
There’s a special version of reduce in Clojure for associative data structures like vectors and hashmaps.
In this lesson, we see how we can wrap a value in
reduced to terminate the reduction early–before it gets to the end of the list.
Sometimes you want to have each of the steps of reduce laid out in a lazy sequence. It’s great for debugging what’s happening at every step, but also has certain applications to reductions over infinite sequences.