Current status: getting humbled by what should have been a simple case of recursion.
Turning it into explicit stack + for loop made me solve in 20min what I had already poured hours into. Damn you imperative mind.
Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy. Stay safe. Please abide by our code of conduct. (Source code)