def held
import ezx@1.11.0.0/src/add/relock.bend as Relockimport 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))