On Saturday, 11 December 2021 at 09:26:06 UTC, Stanislav Blinov
wrote:
What you're showing is... indeed, don't do this, but I fail to
see what that has to do with my suggestion, or the original
code.
You worry too much, just have fun with differing ways of
expressing the same thing.
(Recursion can be completely fine if the compiler supports it
well. Tail recursion that is, not my example.)
Again, that is a different algorithm than what I was responding
to.
Slightly different, but same idea. Isn't the point of this thread
to present N different ways of doing the same thing? :-)