Is anyone else having trouble compiling the “depth_navigator.ex” answer in the Recursion chapter? The function “_navigate(rest, current depth)” is giving me an undefined function/2 error.
I attempted to alter the navigate function at the beginning of the code, adding a “current depth” variable but the result of that is now the code runs an infinite loop.
Hoping someone can shed some light on this. Didn’t want to submit it as a tech error as I’m sure it’s just something I’m missing.
All the best. Ryan