3 ms·
So build up a lazy seq of fns and then dorun it. There are ways and means ;-)
by JulianMorrison 17y ago
So build up a lazy seq of fns and then dorun it. There are ways and means ;-)
- silentbicycle 17y agoBuilding 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.
- dkersten 17y agoand if you simply want mutual recursion, trampoline works well.