supermarin / ObjectiveSugar

ObjectiveC additions for humans. Ruby style.
MIT License
2.17k stars 190 forks source link

Implements pluck, a convenient use case for map #85

Closed inf0rmer closed 10 years ago

inf0rmer commented 10 years ago

Hi! I've implemented support for pluck, a common use case of map: extracting a list of property values.

supermarin commented 10 years ago

@inf0rmer thanks for the PR!

I believe this functionality already exists in Objective-C as valueForKeyPath:. Since it's always better to keep the library as small as possible, this would probably not get merged.

inf0rmer commented 10 years ago

Ah, you're totally right, my bad... and it was being used right before the test I wrote! Doh :). I'll go ahead and close this, thanks!

supermarin commented 10 years ago

@inf0rmer thank you for your time :)