wrap property

Result<T, E> get wrap

Implementation

Result<T, E> get wrap {
  try {
    return Ok<T>(_());
  } on Exception catch (e) {
    return Err<E>(e as E);
  }
}