ListIndexLoop.advice: 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 167-173 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=167&end_line=173 import Base def advice(through: String, list: String) -> String: Bool.pick( String, String.eq(through, "List.length"), "Compute the length once before the loop, and pass it as a parameter.", "Walk " ++ list ++ " instead: match it, use its head, and pass its tail to the next call." ) Uses (4): 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