def choice_dec

cli@0.2.0.0 · cli.bend:4745

import cli@0.2.0.0/cli.bend as Cli
import Base

4745# After validation the key exists: parse and samples keep one_of values.
4746def choice_dec(-A: Data, found: Maybe<&2, A>) -> Dec(Maybe<&2, A>):
4747  match found:
4748    case Some{value}: Done{Some{value}}
4749    case None{}: Fail{Usage{"the value has no choose entry"}}

Uses (4)

Used by (1)