Map with tail recursion


Originally published at:
In the sixth lesson in Recursion 101, we rewrite map to be tail recursive. This lesson includes a video screencast and some code. The lesson is 3 minutes long.


@ericnormand could you do this with the loop macro to hold the accumulator? I was curious why you prefer using a helper function for this. Thanks for the great material!


Hi @chadhs,

Yes, you can do it with a loop. See the tenth lesson:

Rock on!


Awesome thanks, almost to that lesson, should have read the upcoming titles…