Yaml.one.of: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/yaml.bend as Yaml Lines 48-65 of yaml-for-bend@0.1.1.0/yaml.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/yaml.bend&start_line=48&end_line=65 import Base import yaml-for-bend@0.1.1.0/token.bend as T import yaml-for-bend@0.1.1.0/value.bend as V import yaml-for-bend@0.1.1.0/compose.bend as C def one.of(r: Result<&2, &2, T.Error, List<&2, C.Doc>>) -> Result<&2, &2, T.Error, V.Yaml>: match r: case Fail{e}: Fail{e} case Done{ds}: match ds: case Nil{}: Done{V.Null{}} case Con{d, rest}: match d: case C.Doc{v, at}: match rest: case Nil{}: Done{v} case Con{other, more}: match other: case C.Doc{w, second}: Fail{T.Error{"found a second document where load expects one; use load.all", second, T.Content{}}} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/compose.bend&name=Doc https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Cause https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Error https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/value.bend&name=Yaml