def lays

ezx@1.11.0.0 · src/lock/plan.bend:852

import ezx@1.11.0.0/src/lock/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/lock/lock.bend as L

852# every cloned tree that passed its checks, laid ahead of what follows. `vs`
853# are the hashes committed under `.ez/lib`; a plain lock has none, and lays
854# every tree in the cache.
855def lays(
856  +cs: List<&2, String>,
857  +vs: List<&2, String>,
858  js: List<&2, W.Judged>,
859  rest: List<&2, Effect>
860) -> List<&2, Effect>:
861  match js:
862    case []:
863      rest
864    case W.Judged{+h, v} <> t:
865      lay.pick(L.seen.holds(cs, h), v, place.of(L.seen.holds(vs, h)), h,
866        lays(cs, vs, t, rest))

Uses (7)

Used by (1)