Questions tagged [tail-recursion]
For questions where it is important that recursion occurs as a tail call.
5 questions
2
votes
3
answers
279
views
Prevent stack memory usage for recursive function in C
This C code does DBSCAN - Density-based spatial clustering of applications with noise. It's a cluster algorithm for turining unsupervised (no labels) data to become ...
4
votes
1
answer
447
views
tail recursive directory traversal in Rust
Please evaluate and help me understand if my attempted implementation of a tail recursive directory traversal function is actually tail recursive or not. I wrote this from my understanding that a tail ...
8
votes
2
answers
495
views
Tar implementation
I am writing a tar implementation for education purposes and I started with reading from a tar file and printing the file content.
I use recursion for getting the next tar header and googled "...
2
votes
1
answer
95
views
What is better to use for mapping value to Map of functions: tail recursion or foreach?
I want to map functions from my functions library (Map called as chain) to input string str. ...
1
vote
2
answers
537
views
Implementations of unzip in Racket
I've been practicing my folds and tail-call recursive programming, and I wanted to work on unzip for the general case as opposed to just pairs. This was very easy ...