r/coffeescript • • Dec 23 '11
Elegant functions for array math
I wrote this bit of code today and thought it was worth sharing.
This coffeescript snippet is a collection of functions for working on arrays of numbers. Useful for matrix math and what have you.
Enjoy.
1
Upvotes
View all comments
Show parent comment
1
u/jsantell Dec 30 '11
Use an ES5 shim! https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce