I\'m trying to find an elegant way in Coffeescript to merge an array of arrays, so that [[1,2,3],[4,5,6],[7,8,9]] ==> [1,2,3,4,5,6,7,8,9].
As you might imagine, I need t
Just use the JS idiom:
[].concat.apply([], a)
which becomes a little nicer in Coffee:
$ coffee -e 'a = [[1,2,3],[4,5,6],[7,8,9]]; console.dir [].concat a...' [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]