I want to write a function to increment the value of every Node. This is trivial with recursion, but that risks blowing the stack. So I try an iterative version using an explicit stack, but the borrow checker doesn't understand explicit stacks, only the C stack, so it rejects my code.
There's no inherent underlying complexity to transforming a recursive function to an iterative one, yet it is legitimately hard in Rust.
There's no inherent underlying complexity to transforming a recursive function to an iterative one, yet it is legitimately hard in Rust.