19 Jul '12, 3am

Rail Spikes: Understanding map and reduce:

So how do you know when to use map or reduce on a collection? Simple. When iterating through an array, if you don’t want a return value from the operations, use each ; and if you’re looking for a return value, use the iterator method that delivers the type of value you want returned. So if you want to take a collection and return a subset of that collection based on some criteria, use select . (See an earlier article for more.) If you want to return a transformed version of each element, use map . And if you want to return any value whatsoever, or a value that doesn’t match another iterator method, use

Full article: http://railspikes.com/2008/8/11/understanding-map-and-reduce

Tweets

See FTA's interactive map of state of good repa...

fta.dot.gov 23 Jul '12, 2pm

Offices » Organizational Chart Contact Us History of FTA Headquarters Offices Regional Offices Officials » Administrator R...

Understanding Efficiency Standards For External Power Supplies

Understanding Efficiency Standards For External...

electronicdesign.com 18 Jul '12, 5am

Experts calculated that without efforts to increase efficiencies and reduce “no-load” power consumption, external power su...

Fare rises mean passengers won’t be able to aff...

bettertransport.org.uk 16 Jul '12, 8am

Fare rises mean passengers won’t be able to afford benefits of rail investment 16 July 2012 In response to the publication...