onrails
    Preparing search index...
    • Curried collapse with named slots — escape valve when positional match order is unclear at the call site (e.g. when both handlers return the same type and a transposed match(r, onErr, onOk) would silently compile).

      Type Parameters

      • T
      • E
      • U

      Parameters

      • handlers: { err: (error: E) => U; ok: (value: T) => U }

      Returns (result: Result<T, E>) => U