Let RegionManager#addRegions take a function
Merge pull request #1621 from jfairbank/addRegions-function

Pass a function to define regions with RegionManager#addRegions