Replace for-loop with _.foldl. Easier to reason and substantial speedup
in nested arrays. Native Array.prototype.reduce is not terribly
slower. Both suffer from JIT bailouts, essentially running
unoptimized. Must be a better solution.