ListIndexLoop.message: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/list_index_loop.bend as ListIndexLoop Lines 175-187 of bend-lint-rules@0.2.0.0/performance/list_index_loop.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/list_index_loop.bend&start_line=175&end_line=187 import Base def message(+callee: String, +through: String, +list: String, loop: String) -> String: callee ++ " walks " ++ list ++ " from its head" ++ Bool.pick(String, String.eq(callee, through), "", " (through " ++ through ++ ")") ++ ", and " ++ loop ++ " passes " ++ list ++ " unchanged to each call of itself, so a loop that visits each of its n items takes O(n²) time. All lanes. Confidence: high, as each step walks the list again. " ++ advice(through, list) ++ " If the list stays short, expect this finding." Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/list_index_loop.bend&name=advice