Add mapAccumL and mapAccumR. Closes #632.

Reviewed by @tolmasky.
@CrossEye the second test is calling the function returned from `R.mapAccumR(R.add)` with no arguments and confirming that throws. so currying is working as intended here.