Added the `purely` and `impurely` functions

These allow libraries to implement `foldl`-compatible folds without incurring a
`foldl` dependency