def divide.step

emerging-ezhttp@0.21.0.0 · src/http.bend:45

import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import Base

45# one step of the walk; rest is a thunk so Bool.pick does not force recursion
46def divide.step(here: Bool, h: Char, t: String, n: Nat,
47  rest: Unit -> Cut) -> Cut:
48  match here:
49    case True{}:
50      Cut{"", String.drop(SCon{h, t}, n)}
51    case False{}:
52      divide.push(h, rest(Unit{}))

Uses (8)

Used by (1)