$x . ' world', fn (string $y): string => $y . '?', fn (string $z): string => $z . '!', ); self::assertSame('Hello world?!', $x('Hello')); } public function testItCombinesMultipleFunctionsThatDealWithDifferentTypes(): void { $x = Fun\pipe( fn (string $x): int => Str\length($x), fn (int $y): string => $y . '!' ); self::assertSame('5!', $x('Hello')); } public function testItCanCreateAnEmptyCombination(): void { $x = Fun\pipe(); self::assertSame('Hello', $x('Hello')); } }