Core.opt_at: def of bend-schema-lib@0.4.1.0 Import: import bend-schema-lib@0.4.1.0/core.bend as Core Lines 1692-1716 of bend-schema-lib@0.4.1.0/core.bend: https://jend.leeeet.dev/read.txt?path=bend-schema-lib@0.4.1.0/core.bend&start_line=1692&end_line=1716 import Base # An absent value reaches the top of what enc writes for s: s is an SOptional, # or it hands the value it was given straight to a schema that is (a rule, a # strict object, a bound, or the tail of a variant or tagged chain -- and an # SOpt, whose Some case passes the value through). Everything else wraps what # it writes in a constructor of its own, so an absent value cannot surface. def opt_at(s: Schema) -> Bool: match s: case SOptional{i}: True{} case SOpt{i}: opt_at(i) case SRule{s2, tag}: opt_at(s2) case SStrict{s2}: opt_at(s2) case SStrLen{lo, hi, s2}: opt_at(s2) case SListLen{lo, hi, s2}: opt_at(s2) case STagged{k, n, cs, rest}: opt_at(rest) case SVariant{n, vs, rest}: opt_at(rest) case _: False{} Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=bend-schema-lib@0.4.1.0/core.bend&name=Schema