         return result
     }
     
-}+}

    *  @return Index of the element otherwise returns nil if not found
    */
    class func indexOf<T: Equatable>(array: T[], value: T) -> Int? {
        for (index, elem) in enumerate(array) {
            if elem == value {
                return index
            }
        }
        return nil
    }

    /**

    *  @return Last index of element if found otherwise returns nil
    */
    class func lastIndexOf<T: Equatable>(array: T[], value: T) -> Int? {
        return self.findLastIndex(array) { $0 == value }
    }
    
    /**
