Re: [RFC] [Discussion] Short Closures

From: Date: Mon, 07 Sep 2015 17:19:20 +0000
Subject: Re: [RFC] [Discussion] Short Closures
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-88100@lists.php.net to get a copy of this message
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: } :)

« previous php.internals (#88100) next »