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