Mapping Arrays
Problem
You have an array of objects and want to map them to another array, similar to Ruby’s map.
Solution
Use map() with an anonymous function, but don’t forget about list comprehensions.
Discussion
Because CoffeeScript has clean support for anonymous functions, mapping an array in CoffeeScript is nearly as easy as it is in Ruby.
Maps are are good way to handle complicated transforms and chained mappings in CoffeeScript. If your transformation is as simple as the one above, however, it may read more cleanly as a list comprehension.