     ///
     /// :param array The array to wrap.
     /// :return The wrapper object.
-    func map(function: (Int, AnyObject) -> AnyObject) -> $ {
+    func map(function: (Int, AnyObject) -> AnyObject) -> Self {
         var result: AnyObject[] = []
         for (index, elem : AnyObject) in enumerate(self.resultArray) {
             result += function(index, elem)

    ///
    /// :param array The array to wrap.
    /// :return The wrapper object.
    func each(function: (Int, AnyObject) -> ()) -> $ {
        for (index, elem : AnyObject) in enumerate(self.resultArray) {
            function(index, elem)
        }

    /// :param function Function to tell whether element value is true or false.
    /// :return Whether all elements are true according to func function.
    func all(function: (AnyObject) -> Bool) -> Bool {
        return Dollar.every(self.resultArray, iterator: function)
    }
    
    /// Returns if any element in array is true based on the passed function.
