and<U> method

Result<U, E> and<U>(
  1. Result<U, E> res
)

Returns res if the result is Ok, otherwise returns the Err value of this.

Implementation

Result<U, E> and<U>(Result<U, E> res) => isOk ? res : Err(_errValue);