Ops.find: def of near-v-framework@0.4.0.0 Import: import near-v-framework@0.4.0.0/general/rose/ops.bend as Ops Lines 47-55 of near-v-framework@0.4.0.0/general/rose/ops.bend: https://jend.leeeet.dev/read.txt?path=near-v-framework@0.4.0.0/general/rose/ops.bend&start_line=47&end_line=55 import Base import near-v-framework@0.4.0.0/general/rose/type.bend as R # The value at a key, if the forest has it. def find(-N: Data, +k: String, rs: List<&2, R.Rose>) -> Maybe<&2, N>: match rs: case []: None{} case r <> rest: match r: case R.Rose{rk, v, kids}: found(N, String.eq(k, rk), v, find(N, k, kids), find(N, k, rest)) 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/general/rose/ops.bend&name=found https://jend.leeeet.dev/definition.txt?path=near-v-framework@0.4.0.0/general/rose/type.bend&name=Rose