Example #1
0
 public function testNewBinaryFunktion()
 {
     $this->assertInstanceOf(BinaryFunktionInterface::class, Callables::newBinaryFunktion(function ($x, $y) {
         return $x + $y;
     }));
 }
Example #2
0
/**
 * Creates a new binary functor from a given callable.
 *
 * @param callable $bifunctor
 *            The given callable.
 * @return BinaryFunktionInterface
 */
function BinaryFunktion(callable $functor) : BinaryFunktionInterface
{
    return Callables::newBinaryFunktion($functor);
}