             let people = $.join(names, separator: " from ")
             return "Hello \(people)"
             }, "Ankur", "Swift")
-        XCTAssert($.times(3, function: fun) as String[] == ["Hello Ankur from Swift", "Hello Ankur from Swift", "Hello Ankur from Swift"], "Call a function 3 times")
+        XCTAssertEqualObjects($.times(3, function: fun) as String[], ["Hello Ankur from Swift", "Hello Ankur from Swift", "Hello Ankur from Swift"], "Call a function 3 times")
     }
 
     func testAfter() {

    }

    func testSample() {
        let arr : Int[] = [2, 1, 2, 3, 4]
        XCTAssert($.contains(arr, value: $.sample(arr)), "Returns sample which is an element from the array")
    }

    func testPluck() {
        let arr = [["age": 20], ["age": 30], ["age": 40]]
        XCTAssert($.pluck(arr, value: "age") == [20, 30, 40], "Returns values from the object where they key is the value")
    }

    func testFrequencies() {
        XCTAssert($.frequencies(["a", "a", "b", "c", "a", "b"]) == ["a": 3, "b": 2, "c": 1], "Returns correct frequency dictionary")

        let condFreq = $.frequencies([1,2,3,4,5]) { $0 % 2 == 0 }
        XCTAssert(condFreq == [false: 3, true: 2], "Returns correct frequency dictionary from cond")
    }

    func testKeys() {
        let dict = ["Dog": 1, "Cat": 2]
        XCTAssert($.keys(dict) == ["Dog", "Cat"], "Returns correct array with keys")
    }

    func testValues() {
        let dict = ["Dog": 1, "Cat": 2]
        XCTAssert($.values(dict) == [1, 2], "Returns correct array with values")
    }
    
    func testMerge() {
        let dict  = ["Dog": 1, "Cat": 2]
        let dict2 = ["Cow": 3]
        let dict3 = ["Sheep": 4]
        XCTAssert($.merge(dictionaries: dict, dict2, dict3) == ["Dog": 1, "Cat": 2, "Cow": 3, "Sheep": 4], "Returns correct merged dictionary")

        let arr  = [1, 5]
        let arr2 = [2, 4]
        let arr3 = [5, 6]
        let test = $.merge(arrays: arr, arr2, arr3)
        XCTAssert(test == [1, 5, 2, 4, 5, 6], "Returns correct merged array")
    }

    func testPick() {
        let dict = ["Dog": 1, "Cat": 2, "Cow": 3]
        XCTAssert($.pick(dict, keys: "Dog", "Cow") == ["Dog": 1, "Cow": 3], "Returns correct picked dictionary")
    }

    func testOmit() {
        let dict = ["Dog": 1, "Cat": 2, "Cow": 3]
        XCTAssert($.omit(dict, keys: "Dog") == ["Cat": 2, "Cow": 3], "Returns correct omited dictionary")
    }

    func testTap() {
        var beatle = CarExample(name: "Fusca")
        $.tap(beatle, {$0.name = "Beatle"}).color = "Blue"

        XCTAssert(beatle.name == "Beatle", "Set the car name")
        XCTAssert(beatle.color == "Blue", "Set the car color")
    }

    func testChaining() {
        var chain = $(array: [1, 2, 3])
        XCTAssert(chain.first() as Int == 1, "Returns first element which ends the chain")

        chain = $(array: [[1, 2], 3, [[4], 5]])
        XCTAssert(chain.flatten().initial(2).value() as Int[] == [1, 2, 3], "Returns flatten array from chaining")

        chain = $(array: [[1, 2], 3, [[4], 5]])
        XCTAssert(chain.initial().flatten().first() as Int == 1, "Returns flatten array from chaining")

        chain = $(array: [[1, 2], 3, [[4], 5]])
        XCTAssert(chain.flatten().map({ (elem) in elem as Int * 10 }).value() as Int[] == [10, 20, 30, 40, 50], "Returns mapped values")

        XCTAssert(chain.first() as Int == 10, "Returns first element from mapped value")

        var elements: Int[] = []
        chain.each { elements += $0 as Int }
        XCTAssert(elements as Int[] == [10, 20, 30, 40, 50], "Goes through each element in the array")

        XCTAssert(chain.all { ($0 as Int) < 100 } == true, "All elements are less than 100")
        XCTAssert(chain.all { ($0 as Int) < 40 } == false, "All elements are not less than 40")
        XCTAssert(chain.any { ($0 as Int) < 40 } == true, "At least one element is less than 40")

        elements = []
        chain.slice(0, end: 3).each({ elements += $0 as Int})
        XCTAssert(elements as Int[] == [10, 20, 30], "Chained seld")

    }

    func testPartial() {
        let partialFunc = $.partial({(T...) in T[0] + " " + T[1] + " from " + T[2] }, "Hello")
        XCTAssert(partialFunc("World", "Swift") == "Hello World from Swift", "Returns curry function that is evaluated")
    }


    func testBind() {
        let helloWorldFunc = $.bind({(T...) in T[0] + " " + T[1] + " from " + T[2] }, "Hello", "World", "Swift")
        XCTAssert(helloWorldFunc() == "Hello World from Swift", "Returns curry function that is evaluated")

    }

    func testTimes() {

    }

    func testFirst() {
        XCTAssertEqualObjects($.first([1, 2, 3, 4])!, 1, "Return first element")
        XCTAssertNil($.first(NSObject[]()), "Returns nil when array is empty")
    }

    func testNoop() {
        XCTAssertNil($.noop(), "No op returns nothing")
    }

    func testCompact() {
        XCTAssertEqualObjects($.compact([3, nil, 4, 5]), [3, 4, 5], "Return truth array")
        XCTAssertEqualObjects($.compact([nil, nil]) as NSObject[], [], "Return truth array")
    }

    func testFlatten() {
        XCTAssertEqualObjects($.flatten([[3], 4, 5]) as Int[], [3, 4, 5], "Return flat array")
        XCTAssertEqualObjects($.flatten([[3], "Hello", 5]) as NSObject[], [3, "Hello", 5], "Return flat array")
        XCTAssertEqualObjects($.flatten([[[3], 4], 5]) as Int[], [3, 4, 5], "Return flat array")
    }

    func testIndexOf() {
        XCTAssertEqualObjects($.indexOf(["A", "B", "C"], value: "B"), 1, "Return index of value")
        XCTAssertEqualObjects($.indexOf([3, 4, 5], value: 5), 2, "Return index of value")
        XCTAssertEqualObjects($.indexOf([3, 4, 5], value: 3), 0, "Return index of value")
        XCTAssertNil($.indexOf([3, 4, 5], value: 2), "Return index of value")
    }

    func testInitial() {
        XCTAssertEqualObjects($.initial([3, 4, 5]), [3, 4], "Return all values except for last")
        XCTAssertEqualObjects($.initial([3, 4, 5], numElements: 2), [3], "Return all values except for last")
        XCTAssertEqualObjects($.initial([3, 4, 5], numElements: 4), [], "Return all values except for last")
    }

    func testRest() {
        XCTAssertEqualObjects($.rest([3, 4, 5]), [4, 5], "Returns all value except for first")
        XCTAssertEqualObjects($.rest([3, 4, 5], numElements: 2), [5], "Returns all value except for first")
        XCTAssertEqualObjects($.rest([3, 4, 5], numElements: 4), [], "Returns all value except for first")
    }

    func testLast() {
        XCTAssertEqualObjects($.last([3, 4, 5])!, 5, "Returns last element in array")
        XCTAssertNil($.last(NSObject[]()), "Returns nil when array is empty")
    }

    func testFindIndex() {
        let arr = [["age": 36], ["age": 40], ["age": 1]]
        XCTAssertEqualObjects($.findIndex(arr) { $0["age"] < 20 }, 2, "Returns index of element in array")
    }

    func testFindLastIndex() {
        let arr = [["age": 36], ["age": 40], ["age": 1]]
        XCTAssertEqualObjects($.findLastIndex(arr) { $0["age"] > 30 }, 1, "Returns last index of element in array")
    }

    func testLastIndexOf() {
        XCTAssertEqualObjects($.lastIndexOf([1, 2, 3, 1, 2, 3], value: 2), 4, "Returns last index of element in array")
    }

    func testContains() {
        XCTAssertTrue($.contains([1, 2, 3, 1, 2, 3], value: 2), "Checks if array contains element")
        XCTAssertFalse($.contains([1, 2, 3, 1, 2, 3], value: 10), "Checks if array contains element")
    }

    func testRange() {
        XCTAssertEqualObjects($.range(4), [0, 1, 2, 3], "Generates range")
        XCTAssertEqualObjects($.range(1, endVal: 5), [1, 2, 3, 4], "Generates range")
        XCTAssertEqualObjects($.range(0, endVal: 20, incrementBy: 5), [0, 5, 10, 15], "Generates range")
        XCTAssertEqualObjects($.range(4.0), [0.0, 1.0, 2.0, 3.0], "Generates range of doubles")
        XCTAssertEqualObjects($.range(-2.0, endVal: 2.0), [-2.0, -1.0, 0.0, 1.0], "Generates range of doubles")
        XCTAssertEqualObjects($.range(-10.0, endVal: 10.0, incrementBy: 5), [-10.0, -5.0, 0.0, 5.0], "Generates range of doubles")
    }

    func testSequence() {
        XCTAssertEqualObjects($.sequence(0..4), [0, 1, 2, 3], "Generates array of integers")
        XCTAssertEqualObjects($.sequence(-2.0..2.0), [-2.0, -1.0, 0.0, 1.0], "Generates array of doubles")
        XCTAssertEqualObjects($.sequence((0..20).by(5)), [0, 5, 10, 15], "Generates array with offset")
        // FIXME: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subcode=0x0) when "abc' is used with AssertEqualObjects
        // XCTAssertEqualObjects($.sequence("abc"), ["a", "b", "c"], "Generates array of characters")
        XCTAssert($.sequence("abc") == ["a", "b", "c"], "Generates array of characters")
    }

    func testRemove() {
        XCTAssertEqualObjects($.remove([1, 2, 3, 4, 5, 6], iterator: { $0 == 2 || $0 == 3 }), [1, 4, 5, 6], "Remove based on callback")
    }

    func testSortedIndex() {
        XCTAssertEqual($.sortedIndex([3, 4, 6, 10], value: 5), 2, "Index to insert element at in a sorted array")
        XCTAssertEqual($.sortedIndex([10, 20, 30, 50], value: 40), 3, "Index to insert element at in a sorted array")
    }

    func testWithout() {
        XCTAssertEqualObjects($.without([3, 4, 5, 3, 5], values: 3, 5), [4], "Removes elements passed after the array")
        XCTAssertEqualObjects($.without([3, 4, 5, 3, 5], values: 4), [3, 5, 3, 5], "Removes elements passed after the array")
        XCTAssertEqualObjects($.without([3, 4, 5, 3, 5], values: 3, 4, 5), [], "Removes elements passed after the array")
    }

    func testPull() {
        XCTAssertEqualObjects($.pull([3, 4, 5, 3, 5], values: 3, 5), [4], "Removes elements passed after the array")
        XCTAssertEqualObjects($.pull([3, 4, 5, 3, 5], values: 4), [3, 5, 3, 5], "Removes elements passed after the array")
        XCTAssertEqualObjects($.pull([3, 4, 5, 3, 5], values: 3, 4, 5), [], "Removes elements passed after the array")
    }

    func testZip() {
        XCTAssertEqualObjects($.zip(["fred", "barney"], [30, 40], [true, false]) as NSObject[], [["fred", 30, true], ["barney", 40, false]], "Zip up arrays")
    }

    func testZipObject() {
        XCTAssertEqualObjects($.zipObject(["fred", "barney"], values: [30, 40]) as Dictionary<String, Int>, ["fred": 30, "barney": 40], "Zip up array to object")
    }

    func testIntersection() {
        XCTAssertEqualObjects($.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]), [1, 2], "Intersection of arrays")
    }

    func testDifference() {
        XCTAssertEqualObjects($.difference([1, 2, 3, 4, 5], [5, 2, 10]), [1, 3, 4], "Difference of arrays")
    }

    func testUniq() {
        XCTAssertEqualObjects($.uniq([1, 2, 1, 3, 1]), [1, 2, 3], "Uniq of arrays")
    }

    func testUnion() {
        XCTAssertEqualObjects($.union([1, 2, 3], [5, 2, 1, 4], [2, 1]), [1, 2, 3, 4, 5], "Union of arrays")
    }

    func testXOR() {
        XCTAssertEqualObjects($.xor([1, 2, 3], [5, 2, 1, 4]), [3, 4, 5], "Xor of arrays")
    }

    func testAt() {
        XCTAssertEqualObjects($.at(["ant", "bat", "cat", "dog", "egg"], indexes: 0, 2, 4), ["ant", "cat", "egg"], "At of arrays")
    }

    func testEvery() {
        XCTAssertTrue($.every([1, 2, 3, 4]) { $0 < 20 }, "All elements in collection are true")
        XCTAssertFalse($.every([1, 2, 3, 4]) { $0 == 1 }, "All elements in collection are true")
    }

    func testFind() {
        XCTAssertEqualObjects($.find([1, 2, 3, 4], iterator: { $0 == 2 }), 2, "Return element when object is found")
        XCTAssertNil($.find([1, 2, 3, 4], iterator: { $0 == 10 }), "Return nil when object not found")
    }

    func testMax() {
