I had no idea what you were trying to do in the first paragraph whereas without knowing much ruby I can easily read the intent of the second.
Re:The State of Go
by sheepmullet on Sunday February 05, 2017 @10:56PM
(#13576377)
That has more to do with familiarity than anything else.
A tale of two cities is an easier book for an English speaker than Les Aventures de Tintin.
Map applies a function to each item in a collection.
As pseudo-code:
Collection.map(function)
And in the parents example we have:
[1,2,3].map(&:to_s)
The only Ruby specific part is &:.
Compare that to:
IMO that's not fad material - that's progress. Maps and folds can totally be abused to produce inscrutable nonsense, but for small, common operations they're often much more obviously-correct.[1]: `&:method_name` is extremely-common shorthand for "call this method"