Levi Morrison wrote on 07/09/2015 17:56:
>Sort of - the chaining is far from self-explanatory, and some of it is still
>rather artificial. For instance, surely map would in reality have been a
>named function:
>
>function map($fn) {
>         return $input ~> {
>                 foreach ($input as $key => $value) {
>                 yield $key => $fn($value);
>         }
>};
It's really bothering me that you have a mismatched curly brace. :D


Oops, sorry!
Here you go:
}

:)


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to