UnneededPlus.is_needless: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/language/unneeded_plus.bend as UnneededPlus Lines 110-122 of bend-lint-rules@0.2.0.0/language/unneeded_plus.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&start_line=110&end_line=122 import Base # Whether a `+` binder its body uses at most once (`once`) needs no `+`: not if a match takes it apart, nor if it is a # parameter of a definition used as a value: the type it must have can ask for the `+`. def is_needless(once: Bool, parameter: Bool, owner: Owner, b: U32) -> Bool: match once parameter owner: case True{} True{} Owner{values, target, matched}: Bool.not( List.contains(~String, ~String.eq, values, target) ) && Bool.not(List.contains(~U32, ~U32.is_eq, matched, b)) case True{} False{} Owner{values, target, matched}: Bool.not(List.contains(~U32, ~U32.is_eq, matched, b)) case _ _ _: False{} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq 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_eq https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/unneeded_plus.bend&name=Owner