         wait()
     }
 
-    func add(a: Int)(_ b: Int) -> Int {
+    private func add(a: Int)(_ b: Int) -> Int {
         return a+b
     }
     
-    func asyncAdd(a: Int)(_ b: Int) -> Future<Int> {
+    private func asyncAdd(a: Int)(_ b: Int) -> Future<Int> {
         return Future() { get in
             dispatch_async(dispatch_get_main_queue()) {
                 get(a+b)

        async = nil
    }
    
    func wait() {
        waitForExpectationsWithTimeout(1.0, handler: nil)
    }
    

        }
        wait()
    }
    
    func testInfixFmap() {
        let f = add(2) <%> pure(6)
        f.get { v in
            XCTAssertEqual(v, 8)
            self.async?.fulfill()
        }
        wait()
    }
    
    func testInfixApply() {
        let f = pure(add(9)) <*> genuineAsync(7)
        f.get { v in
            XCTAssertEqual(v, 16)
            self.async?.fulfill()
        }
        wait()
    }
    
    func testApplicativeStyle() {
        let f = add <%> genuineAsync(3) <*> genuineAsync(8)
        f.get { v in
            XCTAssertEqual(v, 11)
            self.async?.fulfill()
        }
        wait()
    }
    
    func testMonadicBind() {
        let f = pure(2) >>- asyncAdd(3)
        f.get { v in
            XCTAssertEqual(v, 5)
            self.async?.fulfill()
        }
        wait()
    }

    func testChainedMonadicBind() {
        let f = pure(2) >>- asyncAdd(3) >>- asyncAdd(7)
        f.get { v in
            XCTAssertEqual(v, 12)
            self.async?.fulfill()
        }
        wait()
    }
    
    func testMonadicBindWithReduce() {
        let values = [7, 9, 14, 3, 6].map(asyncAdd)
        let f = values.reduce(pure(0), combine: >>-)
        f.get { v in
            XCTAssertEqual(v, 39)
            self.async?.fulfill()
        }
        wait()
    }
}
