Chaining Functions Demo

2023-06-12に共有


I was thinking of ways to decouple code flow from a standard procedural design and more towards what I call a chaining queue. Basically, the queue starts off with a single function. This function would then add itself with some modified parameters to the call queue via a table {func, args...}. This would closely resemble JavaScript's setTimeout() function.

This demo only uses a 1:1 call (it calls itself once, and that's it), meaning that the queue will never overfill.

I ended up making some really cool-looking color demo accidentally!