Suppose you have a sprite collision and you want to know if there was an explosion and create it if there was.
if you write a function that accepts two UIDs and call it doExplode. Now anytime you add a family or a sprite to the game you just say
on collision alpha with beta
doExplode(alpha,beta)
do other stuff etc.
you don't have to write the code for the explosion for every family and sprite, you just have it onc in the doExplode function.