def why

bend-lint-rules@0.2.0.0 · performance/eager_branch.bend:83

import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch
import Base

83def why(+kind: String, +callee: String) -> String:
84  Bool.pick(
85    String,
86    String.eq(kind, "pick"),
87    "Bool.pick computes both of its values before it picks one, so this call of "
88      ++ callee
89      ++ " runs even when the condition picks the other value",
90    kind
91      ++ " computes its right side even when its left side decides the result ("
92      ++ Bool.pick(String, String.eq(kind, "&&"), "False", "True")
93      ++ "), so this call of "
94      ++ callee
95      ++ " runs even then"
96  )

Uses (4)

Used by (1)