Functor - nope I didn't make it up

Reading through some of the Flash class while working on a big project I came across a new term for me, functor: a function that creates functions. Now we’re onto something great. So my hope is to write a master function that can create seperate functions for seperate objects at runtime. For example:

Object a moves to b and changes into c. <= YES I’M BUILDING A FUSE array for 1000+ objects how did you guess?? :stare:

So I want everything to push the variables through dynamic array.

example:

a = [1,2,3,4,5];
b = [location1, location2, location3];
c = [5,4,3,2,1];

function functorlicious():Void{

function newName():Object{
var name:Object = new Object("something"+a+b);
return name;
}

for(i=0;i<=a.length;i++){
function newName():Void{
a.moveTo(x:b, y:b, 1, blah, blah, blah, function:c);
}
}

}

of course this doesn’t work because the syntax is wrong the function “newName” just keep being over-written by the new code but I’m serious about figuring this out if it can be done in flash and I get 1 step closer to conquering the world with 10 lines of code. Anyone tried this kind of thing yet?

Much love, Big O.:love: