      * @see Array#map
      * @see Array#some
      */
-    public static function simpleCallback(closure:Function):Function
+    public static function simpleCallback(func:Function):Function
     {
         function callback(item:*, index:int, array:*):*
         {
-            return closure(item);
+            return func(item);
         }
         return callback;
+    }
+
+
+    private static function countElements(a:*):Dictionary
+    {
+        var item:*;
+        var itemCount:Dictionary = new Dictionary(true);
+
+        for each (item in a)
+        {
+            item = valueToKey(item);
+            if (itemCount[item])
+            {
+                itemCount[item]++;
+            }
+            else
+            {
+                itemCount[item] = 1;
+            }
+        }
+        return itemCount;
+    }
+
+
+    private static function valueToKey(value:*):*
+    {
+        if (value === null)
+        {
+            return nullKey;
+        }
+        else if (value === undefined)
+        {
+            return undefinedKey;
+        }
+        else
+        {
+            return value;
+        }
     }
 }
 }

     */
    public static function mapToMethod(array:*, methodName:String, methodArgs:* = null):Array
    {
        var mapper:Function = function (m:*, i:int, a:*):*
        {
            return m[methodName].apply(m, methodArgs);
        };
        return array.map(mapper);
    }

    /**
     * Calls a function for each member of an array, and returns how

        return picked;
    }


    /**
     * Given an <code>Array</code> of objects, return the specified
     * property for each one.
