abstract mapEither