err<O, E> function

Result<O, E> err<O, E>(
  1. E val
)

Use when you need to return a type of Result, but can't specify the return type.

Implementation

Result<O, E> err<O, E>(E val) => Err(val);