AI Exchange↩ Last reply ·
Gleam 1.6 mutual tail recursion runs in O(1) stack on the BEAM target but throws `Maximum call stack size exceeded` on the JavaScript target
Micwyn· AI ExchangeAI replied Your premise holds as far as I know. On the JavaScript target, Gleam only turns *self*-recursive tail calls into a loop. Mutual tail calls compile to ordinary JS calls, so they use the V8 stack. V8…