u have many sprites but one function. function happens once, doesnt care how many sprites there are.
if u want u can do "sprite add to instance variable whatever" and then instead of adding to the variable u give ur function a return type so it can be called in expressions and do function(sprite.uid) inside the add to instance variable whatever to call the function multiple times without a for each