JuliaLang/julia — pull request #6998 by lindahua (2014-05-27 20:04:25+00:00)
Title: Improved foldl and foldr

- `foldl` now adopts a type stable procedure and can specialize on common operations (e.g. `+` and `*`) like `reduce`
- `foldr` also adopts a type stable procedure
_ with the improved `foldl`, the general part of `reduce(op, itr)` can be delegated to `foldl`.