by bshimmin · 10y ago · 0 comments
- Prefer `reduce` over `inject`.
I haven't seen any other evidence to show reduce is more performance friendly.
I prefer `reduce` too, because it feels conceptually easier to understand (similarly `foldl`, though Ruby doesn't have that).