@@ -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 | } |
@@ -4,6 +4,6 @@ |
||
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | use Baethon\Phln\FixedArityFn; |
6 | 6 | |
7 | -P::macro('nAry', function (int $n, callable $fn): callable { |
|
7 | +P::macro('nAry', function(int $n, callable $fn): callable { |
|
8 | 8 | return FixedArityFn::of($n, $fn); |
9 | 9 | }); |