Questions tagged [tail-recursion]

For questions where it is important that recursion occurs as a tail call.

Filter by
Sorted by
Tagged with
2 votes
3 answers
199 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 ...
euraad's user avatar
  • 183
4 votes
1 answer
380 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 ...
nohup's user avatar
  • 143
8 votes
2 answers
365 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 "...
mortytheshorty's user avatar
2 votes
1 answer
86 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. ...
Gudsaf's user avatar
  • 186
1 vote
1 answer
486 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 ...
BrainFRZ's user avatar
  • 819