Joined July 2012
·
Posted to
Using .reject with .map in Ruby
over 1 year
ago
@hauleth This is just an abstract example. Ideally if you just only wanted to remove items from a collection, you could just use .reject and it will return a new array. Of course you would only use map if you wanted transform the collection in some way.
Achievements
102 Karma
6,890 Total ProTip Views
Raven
Have at least one original repo where some form of shell script is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
Charity
Fork and commit to someone's open source project in need
Komodo Dragon
Have at least one original repo where Java is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
As you can see, inequality issues can arise. This boxing issue occurs for any primitive.