an_array.map(&:to_s)
is the same as
an_array.map{ |element| element.to_s }
I'm also severely disappointed that the pretzel operator can't be used with parameters. Oh, well.
There was also Feeling Friday, but I had to leave early, and hence missed it. It's supposed to be lots of fun, though!
Skills developed: Iteration for enumerable classes
QOTD: "I hope that Ruby jumps out of my computer and punches me in the eye!" - Avi (before trying to pop elements off an array while mapping it)
No comments:
Post a Comment