You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.
One of my biggest complaints about PHP's native methods array_map(), array_filter(), array_reduce() is that they only provide the array value to the predicate Closure instead of both the key and the value as Underscore.js does.
It would be really helpful if this library provided those.
I've read that there's intent not to collide native method names, i.e. using each instead of map, so I'd suggest select instead of filter and fold instead of reduce for these revised functions.
Just started investigating this project.
One of my biggest complaints about PHP's native methods
array_map()
,array_filter()
,array_reduce()
is that they only provide the array value to the predicate Closure instead of both the key and the value as Underscore.js does.It would be really helpful if this library provided those.
I've read that there's intent not to collide native method names, i.e. using
each
instead ofmap
, so I'd suggestselect
instead offilter
andfold
instead ofreduce
for these revised functions.Consider:
Unless there is disagreement with the proposed changes I'll seek to contribute these.
The text was updated successfully, but these errors were encountered: