foldLeft -> mapFoldLeft (it is, really).
Parameter types in RangeEx are all renamed to A.