Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Most likely Ruby takes the name inject from Smalltalk. (Smalltalk also uses 'collect' for map, 'select' for filter, 'reject' for an inverse filter.)


Thank you for pointing out the history! The names inject, collect, select, and reject drive me crazy for some reason. Maybe it's because they rhyme. But every time I saw them, I wondered why Matz made these up instead of using map/filter/reduce. At least now I know.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: