Grant Rettke over at Wisdom and Wonder has posted a nice bit of Elisp that runs a function on every source block in an Org file. His use case for this is getting rid of the results from running the source blocks. As he says, sometimes you accidently evaluate the source blocks—usually as a result of exporting—and then have (potentially) large results cluttering up your document.
Rettke solves that by running his source block code with a function that calls
org-babel-remove-result. It’s a cute trick and introduced me to
org-babel-remove-result, which I wasn’t familiar with. Hop on over and take a look if you have a need for cleaning up your results or need to run a function on all your source blocks.