Skip to content

Comment on The Yin and Yang of Programmingparent

Comments

Recursion without optimizations requires a possibly unbounded stack. Tail call optimization allows optimizing certain recursive functions in a way that no nested stack frames are needed.

So from a purely functional point of view, tail recursion and iteration are essentially a bijection.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.