Function to call a function on every code module