Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So build up a lazy seq of fns and then dorun it. There are ways and means ;-)


Building up thunks carries some overhead. In languages without TCO, virtual machines are usually written with e.g. a big switch statement with everything in one big function just because any overhead there will impact every single operation that runs on the system. Not every VM needs to be fast, of course, but it's a common requirement for production versions.


and if you simply want mutual recursion, trampoline works well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: