Fixed scanr1 composition
mapAccumL and mapAccumR