Whenever I see Ruby code that says:
arrayNames.collect { ... }
I forgot what collection is, and I need to look at what it is and find that it is the same as map ().
I can understand that mapping is 1 byte per pixel, and the function is mapping x to ay, from 2 to 4, from 5 to 25, etc. But where does the name “collect” come from? Perhaps this will help to recall what the “assemble” method is.
source
share