Cognitive.judge: def of bend-lint-pack@0.1.1.0 Import: import bend-lint-pack@0.1.1.0/complexity/cognitive.bend as Cognitive Lines 89-107 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=89&end_line=107 import Base import bend-lint-pack@0.1.1.0/vendor/lint.bend as Lint import bend-lint-pack@0.1.1.0/common.bend as Common def judge(+max: U32, seen: List<&2, Common.Seen>, out: List<&2, Lint.Diag>) -> IO(List<&2, Lint.Diag>): match seen: case Nil{}: IO.pure(List<&2, Lint.Diag>, List.reverse(&2, Lint.Diag, out)) case Con{Common.Seen{+owner, span}, rest}: do IO>: body : Maybe<&2, Lint.Node> <- Lint.body(owner) +score : U32 <- score.of(body) judge( max, rest, Common.onto( Common.when( U32.is_gt(score, max), Common.diag(Lint.Warning{}, message(owner, score, max), span) ), out ) ) Uses (18): 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=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_gt https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/common.bend&name=Seen https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/common.bend&name=diag https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/common.bend&name=onto https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/common.bend&name=when https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/complexity/cognitive.bend&name=message https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/complexity/cognitive.bend&name=score.of https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/vendor/lint.bend&name=Diag https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/vendor/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/vendor/lint.bend&name=Severity https://jend.leeeet.dev/definition.txt?path=bend-lint-pack@0.1.1.0/vendor/lint.bend&name=body