diff --git a/README.md b/README.md index 9aa4ec6..dbb3d69 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,12 @@ use Psl\Iter; */ function foo(iterable $codes): string { - return Str\join(Iter\map( - Iter\filter_nulls($codes), fn($i) => Str\chr($i), - ), ', '); + /** @var Iter\Iterator $codes */ + $codes = Iter\filter_nulls($codes); + /** @var Iter\Iterator $chars */ + $chars = Iter\map($codes, fn(int $code): string => Str\chr($code)); + + return Str\join($chars, ', '); } foo([95, 96, null, 98]);