<p>I have a function that passes an array to another function as an argument, there will be multiple data types in this array but I want to know how to pass a function or a reference to a function so the other function can call it at any time.</p>

<p>ex.</p>

<p>function A:</p>

<pre><code>add(new Array("hello", some function));
</code></pre>

<p>function B:</p>

<pre><code>public function b(args:Array) {
    var myString = args[0];
    var myFunc = args[1];
}
</code></pre>

This is very easy in ActionScript:
```
```
function someFunction(foo, bar) {
   ...
}

function a() {
    b(["hello", someFunction]);
}

function b(args:Array) {
    var myFunc:Function = args[1];
    myFunc(123, "helloworld");
}
```
```