Nick was interested in this one, but if anyone wants to take a crack at making it faster/cleaner, go for it.
Honestly, I wasn't too worried about it since I made it for an array of 7 values, so speed wasn't such a big deal, but for people who like algorithms, it could be pretty fun!
https://github.com/Awkewainze/FriendBot/blob/main/src/utils/array.ts#L69
Nick was interested in this one, but if anyone wants to take a crack at making it faster/cleaner, go for it.
Honestly, I wasn't too worried about it since I made it for an array of 7 values, so speed wasn't such a big deal, but for people who like algorithms, it could be pretty fun!