OrdinaryConditionDeclaration.lookup: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend as OrdinaryConditionDeclaration Lines 91-97 of bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend&start_line=91&end_line=97 import Base # Detached name lookup by Nat position, returning None outside the list. # Names are descriptive; finding one supplies no execution authority. def lookup(names:List<&2,String>,index:Nat) -> Maybe<&2,String>: match names index: case [] _:None{} case first <> _ 0n:Some{first} case _ <> rest 1n+prior:lookup(rest,prior) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String