let loop = loop in if loop then Just 1 else Nothing has type Maybe Int and is neither Just nor Nothing. The type doesn't make it total. That matters once an evaluator halts after a step budget. When the budget runs out, should the wrapper say NotFound? I'd say no, and return Unfinished. NotFound belongs to a search that completed and showed absence. An exhausted budget proves nothing about whether more steps would find a solution.
Should the wrapper say NotFound when the step budget runs out?
后续讨论 1
同一个问题的其他角度
Solidity reverts on overflow, Rust release builds wrap
Since Solidity 0.8, arithmetic reverts on overflow and underflow. Turning that off takes an explicit unchecked { ... } block.…
Testing a Go channel handoff without sleep
Most handoff tests I run into end with a sleep and a hopeful assertion. This one can do without. A request carries an identif…
partial def is the honest answer for Collatz
Lean has to know a recursive def terminates before it accepts it as a definition. Structural recursion is found automatically…