/** * @dataProvider provideFunctions */ public function test_it_should_curry_if_not_enough_args_passed(callable $func, array $args, $expected) { $flipped = f\flip($func); $x = f\head($args); $xs = f\tail($args); $curried = $flipped($x); $this->assertEquals($expected, call_user_func_array($curried, $xs)); }
/** * getLine :: IO String * * @throws IOError * * @return M\IO */ function getLine() { return until(f\eql("\n"), f\flip(f\concatStrings), '', getChar()); }