def maybe

bend-kit-property@0.4.0.0 · shrink.bend:104

import bend-kit-property@0.4.0.0/shrink.bend as Shrink
import Base

104# None, then Some of each candidate of x. None for None.
105def maybe(~A: Data, ~shrink: A -> List<&1, A>, m: Maybe<&2, A>) -> List<&1, Maybe<&2, A>>:
106  match m:
107    case None{}:
108      Nil{}
109    case Some{x}:
110      None{} <> maybe.some(A, shrink(x))

Uses (3)

Used by (0)

No other definition uses this definition.