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.
*
* @psalm-template XType
* @psalm-template ResultType
*/
final class J extends Combinator
{
* @var callable
private $f;
* @var mixed
private $x;
private $y;
private $z;
* J constructor.
* @psalm-param callable(XType) : callable $f
* @psalm-param XType $x
* @psalm-param XType $y
* @psalm-param XType $z
* @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;
}
* @psalm-return ResultType
public function __invoke()
return (($this->f)($this->x))((($this->f)($this->z))($this->y));