3 ms·
> You can do this in any language, functional or not. No, not in practice. For example, in an average imperative language, you'd have no tail-call optimisation
by willtim 6y ago
> You can do this in any language, functional or not.
No, not in practice. For example, in an average imperative language, you'd have no tail-call optimisation, and so would run out of stack space pretty quickly. There'd also be no persistent collections, meaning you'd have to keep copying any sets of values for every recursive call with absymal complexity. And so on...