def agree.go
import ezx@1.11.0.0/src/ws/joint.bend as Jointimport Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
203# whether every dependency of a list is the first declaration of its name in
204# the whole list
205def agree.go(ds: List<&2, M.Dep>, +all: List<&2, M.Dep>) -> Bool:
206 match ds:
207 case []:
208 True{}
209 case +hd <> tl:
210 rest = agree.go(tl, all)
211 Bool.and(dep.eq(hd, M.find(all, M.dep.name(hd))), rest)