inspect method

TaskResult<T, E> inspect(
  1. void op(
    1. T data
    )
)

Calls given op if ok and returns the result as is.

Implementation

TaskResult<T, E> inspect(void Function(T data) op) {
  if (isOk) {
    op(data!);
  }
  return this;
}