logoalt Hacker News

tpoacher • yesterday at 11:45 PM • 1 reply • view on HN

Not OP, and probably not what he meant, but for me the insight that any for loop can be expressed as a fully equivalent tail-recursive call and vice-versa is what I would describe as my No.3 moment.


Replies

packetlost • today at 12:01 AM

I don't think that's what is being said. The statement is more like 'any imperative program can be represented by a purely functional representation', which goes beyond simply modeling loops with tail call elimination.