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.

https://gist.github.com/1515498

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Dec 29 '11

Good comments.

I'm hesitant to use Array.reduce() due to compatibility issues with older browsers.

/me Wishes everyone would just switch to V8.