Add mapAccumL and mapAccumR. Closes #632.

Reviewed by @tolmasky.
Nit: Please remove the spaces after the `[` and before the `]` in the inner list.