def among.step

ezx@1.11.0.0 · src/git/git.bend:46

import ezx@1.11.0.0/src/git/git.bend as Git
import Base

46# one step of a scan looking for one hit, with the head's answer in hand.
47# `Bool.or` is an ordinary function and reduces both of its sides, so the
48# alphabet was read to its end for every char of every ref. The rest of the
49# scan arrives as a thunk, which is a value, and only the arm that wants it
50# applies it.
51def among.step(here: Bool, rest: Unit -> Bool) -> Bool:
52  match here:
53    case True{}:
54      True{}
55    case False{}:
56      rest(Unit{})

Uses (2)

Used by (1)