def first

bend-schema-lib@0.4.1.0 · core.bend:766

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

766# The first of two: the second counts only when the first found nothing.
767def first(m: Maybe<&2, Err>, n: Maybe<&2, Err>) -> Maybe<&2, Err>:
768  match m:
769    case None{}:
770      n
771    case Some{e}:
772      Some{e}

Uses (2)

Used by (1)