@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | load_macro('logic', 'isEmpty'); |
8 | 8 | |
9 | -P::macro('last', call_user_func(function () { |
|
9 | +P::macro('last', call_user_func(function() { |
|
10 | 10 | $lastElement = P::slice(-1, 1); |
11 | 11 | $lastOfArray = P::pipe([ |
12 | 12 | $lastElement, |
@@ -3,10 +3,10 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('typeCond', function (array $pairs): \Closure { |
|
6 | +P::macro('typeCond', function(array $pairs): \Closure { |
|
7 | 7 | $typeToPredicate = P::ifElse('\\is_callable', P::identity(), P::is()); |
8 | 8 | |
9 | - $mapRow = function ($row) use ($typeToPredicate) { |
|
9 | + $mapRow = function($row) use ($typeToPredicate) { |
|
10 | 10 | $p = $typeToPredicate($row[0]); |
11 | 11 | return [$p, $row[1]]; |
12 | 12 | }; |
@@ -3,6 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('intersection', function (array $left, array $right): array { |
|
6 | +P::macro('intersection', function(array $left, array $right): array { |
|
7 | 7 | return P::compose([P::values(), '\\array_intersect'])($left, $right); |
8 | 8 | }); |
@@ -3,6 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('difference', function (array $left, array $right): array { |
|
6 | +P::macro('difference', function(array $left, array $right): array { |
|
7 | 7 | return P::compose([P::values(), '\\array_diff'])($left, $right); |
8 | 8 | }); |
@@ -4,13 +4,13 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use function Baethon\Phln\assert_object; |
6 | 6 | |
7 | -P::macro('props', function (array $props, $object): array { |
|
7 | +P::macro('props', function(array $props, $object): array { |
|
8 | 8 | assert_object($object); |
9 | 9 | |
10 | 10 | $getProp = P::partial(P::prop(), [P::__, $object]); |
11 | 11 | |
12 | 12 | return P::reduce( |
13 | - function ($carry, $prop) use ($getProp) { |
|
13 | + function($carry, $prop) use ($getProp) { |
|
14 | 14 | return P::append($getProp($prop), $carry); |
15 | 15 | }, |
16 | 16 | [], |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('invoker', function (int $arity, string $method): callable { |
|
7 | - $wrapper = function (...$args) use ($arity, $method) { |
|
6 | +P::macro('invoker', function(int $arity, string $method): callable { |
|
7 | + $wrapper = function(...$args) use ($arity, $method) { |
|
8 | 8 | $args = array_slice($args, 0, $arity + 1); |
9 | 9 | $object = array_pop($args); |
10 | 10 |
@@ -6,6 +6,6 @@ |
||
6 | 6 | |
7 | 7 | load_macro('fn', 'always'); |
8 | 8 | |
9 | -P::macro('F', function (): callable { |
|
9 | +P::macro('F', function(): callable { |
|
10 | 10 | return P::always(false); |
11 | 11 | }); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | load_macro('fn', 'always'); |
8 | 8 | |
9 | -P::macro('T', function (): callable { |
|
9 | +P::macro('T', function(): callable { |
|
10 | 10 | return P::always(true); |
11 | 11 | }); |
12 | 12 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | load_macro('fn', 'pipe'); |
8 | 8 | |
9 | -P::macro('compose', function (array $fns): \Closure { |
|
9 | +P::macro('compose', function(array $fns): \Closure { |
|
10 | 10 | if (0 === count($fns)) { |
11 | 11 | throw new \UnderflowException('compose requires at least one argument'); |
12 | 12 | } |