getUpperServices function
Implementation
Either<String, List<UpperService>> getUpperServices(
List<dynamic> services,
) {
var result = <UpperService>[];
var errors = '';
services.forEach((element) {
getUpperServiceFromMap(element).fold(
(l) => errors += l,
(r) => result.add(r),
);
});
if (errors.isNotEmpty) {
return left(errors);
} else {
return right(result);
}
}