Reminds me of an early Uni project where we had to operate on data in an array of 5 elements, but because “I didn’t teach it to everyone yet” we couldn’t use loops. It was going to be a tedious amount of copy-paste.
I think I got around it by making a function called “not_loop” that applied a functor argument to each element of the array in serial. Professor forgot to ban that.
A much better idea than when I tried to organize my restaurant with hashtables.
It was too much for the waitstaff, who had to reindex the floor plan every time they added or removed a plate.
On the plus side, delivering the right food was always O(1).