Re: [RFC] [Discussion] Add new function `array_group`
| From: | Aleksander Machniak | Date: | Wed, 31 May 2023 07:30:01 +0000 |
| Subject: | Re: [RFC] [Discussion] Add new function `array_group` | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120484@lists.php.net to get a copy of this message | ||
On 30.05.2023 13:34, Boro Sitnikovski wrote:
I propose introducing a function to PHP core namedSorry, I'm sick right now and have no clue, but how does it relate to https://wiki.php.net/rfc/array_column_results_grouping -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.comarray_group. This function takes an array and a function and returns an array that contains arrays - groups of consecutive elements. This is very similar to Haskell'sgroupByfunction <https://hackage.haskell.org/package/groupBy-0.1.0.0/docs/Data-List-GroupBy.html>.