So the code is solid. Did a bit of a refactor (without tests, I hope nothing broke!).

Now I'm thinking... can I optimise recursive tail-calls automatically?

I know it is a return with a recursive function call; do I need the "tailc" tag at all? 🤔

I'm going to have a shower and will think about it before writing any code 😂

Yep, it is possible. I can't see any downsides, other that the extra checks to decided if the optimization is possible.

Follow

And it was simple, actually 😂

Well, that's done, and I'm done for today. Some relax before going to bed!

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko