wrap property
Implementation
Future<Result<List<T>, Exception>> get wrap async {
return Isolate.run(() async {
try {
return Ok<List<T>>(
await Future.wait(
iterable.fold(
<Future<T>>[],
(Iterable<Future<T>> acc, Future<T> Function() curr) =>
<Future<T>>[...acc, curr()],
),
),
);
} on Exception catch (e) {
return Err<E>(e as E);
}
});
}