Beispiel #1
0
 /**
  * @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));
 }
Beispiel #2
0
 /**
  * @dataProvider provideData
  */
 public function test_it_should_take_head_of_a_list($list, $expected)
 {
     $this->assertEquals($expected, f\head($list));
 }