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 J.
*/
final class J extends Combinator
{
* @var callable
private $f;
private $x;
* @var mixed
private $y;
private $z;
* J constructor.
*
* @param callable $f
* @param mixed $x
* @param mixed $y
* @param mixed $z
public function __construct(callable $f, $x, $y, $z)
$this->f = $f;
$this->x = $x;
$this->y = $y;
$this->z = $z;
}
* @return mixed
public function __invoke()
return (($this->f)($this->x))((($this->f)($this->z))($this->y));
* @return callable
public static function closure(): callable
return static function (callable $f, $x, $y, $z) {
return (new self($f, $x, $y, $z))();
};