Lock.any.step: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/lock/lock.bend as Lock Lines 375-388 of ezx@1.11.0.0/src/lock/lock.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/lock/lock.bend&start_line=375&end_line=388 import Base # one step of a scan that is looking for one hit. Every scan in this file # wants it, so it is stated once here. # # `Bool.or` is an ordinary function and reduces both of its sides, so a scan # written with it reads the whole list even when the head answers. The rest of # the scan arrives as a thunk, which is a value, and only the arm that wants # it applies it; handed in as an ordinary argument it would be reduced before # this def could decline it. def any.step(here: Bool, rest: Unit -> Bool) -> Bool: match here: case True{}: True{} case False{}: rest(Unit{}) Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit