Cognitive.walk.arms: def of bend-lint-pack@0.1.1.0 Import: import bend-lint-pack@0.1.1.0/complexity/cognitive.bend as Cognitive Lines 40-51 of bend-lint-pack@0.1.1.0/complexity/cognitive.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-pack@0.1.1.0/complexity/cognitive.bend&start_line=40&end_line=51 import Base import bend-lint-pack@0.1.1.0/vendor/lint.bend as Lint # The children of a Mat: the first is an arm body, one level down; the others continue the chain. def walk.arms(cs: List<&2, Lint.Node>, +depth: U32, +first: Bool, total: U32) -> IO(U32): match cs: case Nil{}: IO.pure(U32, total) case Con{c, rest}: IO.bind( U32, U32, walk(c, Bool.pick(U32, first, U32.add(depth, 1), depth), Bool.not(first), total), t2 => walk.arms(rest, depth, False{}, t2) ) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/complexity/cognitive.bend&name=walk https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/vendor/lint.bend&name=Node