for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace loophp\combinator\Combinator;
use loophp\combinator\Combinator;
/**
* Class U.
*/
final class U extends Combinator
{
* @var callable
private $f;
private $g;
* U constructor.
*
* @param callable $f
* @param callable $g
public function __construct(callable $f, callable $g)
$this->f = $f;
$this->g = $g;
}
* @return mixed
public function __invoke()
$f = $this->f;
$g = $this->g;
return $g(($f($f()))($g));
* @return callable
public static function toClosure(): callable
return static function (callable $f, callable $g) {
return (new self($f, $g))();
};