Implemented `mapMaybe` and `mapEither`