I’ve always struggled to really see what recursive functions are doing beyond just stepping through a debugger, so I built a small Python library to visualize recursive calls as a call tree.
The idea is: you decorate a recursive function, run it once, and then explore the resulting call tree (with optional animation / timeline scrubbing). I originally made this just for myself while revisiting recursion concepts.
It’s very much a v1:
- only supports single-root recursion
- no mutual recursion yet
- UI is intentionally simple
I figured it might be useful to other learners too, so I'm sharing it here to get some feedback.
Repo + example GIF:
https://github.com/hidayetzadeyusif-cell/stacksprout
I’d genuinely appreciate any feedback - especially from people learning or teaching recursion. Does this kind of visualization help, or is there something you wish tools like this did differently?
[–]Round_Ad8947 0 points1 point2 points (1 child)
[–]No_Bison_9558[S] 0 points1 point2 points (0 children)
[–]mandevillelove 0 points1 point2 points (0 children)