Name the work
A decision becomes easier to discuss when it has a name. Move the comparison into needs_review. The entry now asks that function a question and returns its answer.
flow needs_review(amount: Int) -> Bool = amount > 100
pub flow main(amount: Int) -> Bool = needs_review(amount)
falseFollow the values
main receives an amount and passes it to needs_review. The helper returns a Bool: true or false.
A function's parameters and result give you a compact description of its job. Read needs_review(amount: Int) -> Bool as “give me an integer amount, and I will answer yes or no.” Names such as needs_review help a reader understand why a comparison exists.
Keep an intermediate value
You can expand the entry into a block:
pub flow main(amount: Int) -> Bool = {
let answer = needs_review(amount)
answer
}A let gives a value a name. The final expression is the block's result. Values are immutable: to continue with a different value, compute and pass a new one. A later binding can reuse a name, but it does not change the earlier value.
A smaller test surface
The helper now owns the boundary. Change it to include 100, then check the exercise. The entry should not need its own copy of the comparison. When the rule changes again, one function is the place to explain and edit it.
Exact rules: values, bindings and functions.