4 ms·
The tail-recursive version is a good intermediate step towards the loop version - especially if you have more complex algorithms. It would however be great, if
by _ph_ 9y ago
The tail-recursive version is a good intermediate step towards the loop version - especially if you have more complex algorithms. It would however be great, if Go would do tail call optimization, making the tail-recursive version as efficient as the explicit loop.