Closed Insolita closed 5 years ago
Will think about it.
The code you provide for array_map_assoc() seems to contain an error (undefined variable $acc). Otherwise looks like a nice addition. I would come up with a different naming though.
i type it from mobile, if u want i can make pr
PRs are always welcome! Make sure you have a unit test though
On Mon, Nov 12, 2018, 17:03 Insolita notifications@github.com wrote:
i type it from mobile, if u want i can make pr
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/crocodile2u/chainy/issues/4#issuecomment-437935040, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqAdKcuMhCNWztuhpbPQHxHmdjKDTFKks5uuZvDgaJpZM4YZBEq .
-- Best regards, Victor Bolshov
I decided not to introduce another map/reduce methods to Chain. Instead, I added an optional boolean $keys parameter to both Chain::map() and Chain::reduce(), which in essence work exactly as you described
it are not php native, but sometimes very usefull
it logic like as