@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('partialRight', function (callable $fn, array $args): \Closure { |
|
7 | - return function (...$innerArgs) use ($fn, $args) { |
|
6 | +P::macro('partialRight', function(callable $fn, array $args): \Closure { |
|
7 | + return function(...$innerArgs) use ($fn, $args) { |
|
8 | 8 | return $fn(...array_merge($innerArgs, $args)); |
9 | 9 | }; |
10 | 10 | }); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('tap', function (callable $fn, $value) { |
|
6 | +P::macro('tap', function(callable $fn, $value) { |
|
7 | 7 | $fn($value); |
8 | 8 | return $value; |
9 | 9 | }); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('throwException', function (string $exception, array $args): \Closure { |
|
7 | - return function () use ($exception, $args) { |
|
6 | +P::macro('throwException', function(string $exception, array $args): \Closure { |
|
7 | + return function() use ($exception, $args) { |
|
8 | 8 | throw new $exception(...$args); |
9 | 9 | }; |
10 | 10 | }); |
@@ -3,6 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('apply', function (callable $fn, array $arguments) { |
|
6 | +P::macro('apply', function(callable $fn, array $arguments) { |
|
7 | 7 | return $fn(...$arguments); |
8 | 8 | }); |
@@ -3,6 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('unapply', function (callable $fn, ...$args) { |
|
6 | +P::macro('unapply', function(callable $fn, ...$args) { |
|
7 | 7 | return $fn($args); |
8 | 8 | }); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('swap', function (callable $f): \Closure { |
|
7 | - return function ($second, $first, ...$tail) use ($f) { |
|
6 | +P::macro('swap', function(callable $f): \Closure { |
|
7 | + return function($second, $first, ...$tail) use ($f) { |
|
8 | 8 | $arguments = array_merge([$first, $second], $tail); |
9 | 9 | return $f(...$arguments); |
10 | 10 | }; |
@@ -3,6 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('of', function ($value): array { |
|
6 | +P::macro('of', function($value): array { |
|
7 | 7 | return [$value]; |
8 | 8 | }); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('negate', function (callable $predicate): \Closure { |
|
7 | - return function (...$args) use ($predicate) { |
|
6 | +P::macro('negate', function(callable $predicate): \Closure { |
|
7 | + return function(...$args) use ($predicate) { |
|
8 | 8 | return !$predicate(...$args); |
9 | 9 | }; |
10 | 10 | }); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | |
4 | 4 | use Baethon\Phln\Phln as P; |
5 | 5 | |
6 | -P::macro('always', function ($value): \Closure { |
|
7 | - return function () use ($value) { |
|
6 | +P::macro('always', function($value): \Closure { |
|
7 | + return function() use ($value) { |
|
8 | 8 | return $value; |
9 | 9 | }; |
10 | 10 | }); |