RepeatedCall.is_same: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/repeated_call.bend as RepeatedCall Lines 179-196 of bend-lint-rules@0.2.0.0/performance/repeated_call.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/repeated_call.bend&start_line=179&end_line=196 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # Whether `xs` and `ys` are written the same way, node by node and below (if `ok`); `fuel` bounds the nodes compared. def is_same(+fuel: Nat, xs: List<&2, Lint.Node>, ys: List<&2, Lint.Node>, ok: Bool) -> Bool: match fuel xs ys ok: case _ _ _ False{}: False{} case _ Nil{} Nil{} True{}: True{} case 0n _ _ True{}: False{} case 1n+f Con{+x, xt} Con{+y, yt} True{}: is_same( f, List.append(&2, Lint.Node, Lint.Node.kids(x), xt), List.append(&2, Lint.Node, Lint.Node.kids(y), yt), is_shallow(x, y) ) case _ _ _ True{}: False{} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node.kids https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/repeated_call.bend&name=is_shallow