Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61147 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91376 invoked from network); 11 Jul 2012 23:53:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2012 23:53:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:50023] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/A2-09688-3121EFF4 for ; Wed, 11 Jul 2012 19:53:56 -0400 Received: from [192.168.2.230] (ppp-188-174-38-90.dynamic.mnet-online.de [188.174.38.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id BAAB4626DA; Thu, 12 Jul 2012 01:53:52 +0200 (CEST) To: Nikita Popov Cc: PHP internals In-Reply-To: <1342050547.1456.33.camel@guybrush> References: <1342050547.1456.33.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Thu, 12 Jul 2012 01:53:51 +0200 Message-ID: <1342050831.1456.35.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Internal iteration API From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2012-07-12 at 01:49 +0200, Johannes Schlüter wrote: > Just picking some random example: > > * array_map() - This can be implemented using that infrastructure. > (While some might think about returning an Traversable object if > a Traversable object got put in, maybe a FilterIterator but > let's ignore that) > * array_filter() - This is almost the same as array_map() but we > can't implement it using Traversable, as current() (for good > reasons) returns no reference. I meant array_walk(). array_filter() shouldn't be an issue either. That happens, when you shorten a list of examples ... johannes