def held

ezx@1.11.0.0 · src/add/relock.bend:120

import ezx@1.11.0.0/src/add/relock.bend as Relock
import Base
import ezx@1.11.0.0/src/lock/lock.bend as L

120# whether the lock holds a package under the hash
121def held(ps: List<&2, L.Pack>, +hash: String) -> Bool:
122  match ps:
123    case []:
124      False{}
125    case h <> t:
126      L.any.step(String.eq(L.pack.hash(h), hash), _u => held(t, hash))

Uses (7)

Used by (2)