Sometimes we don't have just an array of numbers, but of objects, not necessarily in the supported shapes.
I'd like to investigate using iterators or maybe callbacks to implement generic versions of the algorithms, and see what would be the performance overhead.