def choice_reason

cli@0.2.0.0 · cli.bend:2050

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

2050def choice_reason(found: Maybe<&2, List<&2, String>>,
2051    value: String) -> Maybe<&2, String>:
2052  match found:
2053    case None{}: None{}
2054    case Some{+values}:
2055      Bool.pick(Maybe<&2, String>,
2056        List.contains(~String, ~String.eq, values, value),
2057        None{}, Some{choices_reason(values)})

Uses (7)

Used by (1)