scanl as foldr using eta expansion