Dynamically Run Functions

I’d like a generic function that can take:
a) object/array containing various classed items
b) method to run on them


var itemA = new Item();
var itemB = new Item();

var obj:Object = new Object();
obj.itemA = itemA;
obj.itemB = itemB;


private function doFuncOnChildren(obj,func) {
     for each (var child:* in obj) {
          //do function on child here, using the argument func
          //...i.e. would eval to child.someFunction();