def hub.all
ezx@1.11.0.0 · src/lock/run.bend:114
import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/hub/hub.bend as Web
import ezx@1.11.0.0/src/hub/get.bend as Net
import ezx@1.11.0.0/src/pkg/pkg.bend as K
import ezx@1.11.0.0/src/lock/lock.bend as L
114
115def hub.all(+hub: String, +hash: String, fs: List<&2, K.Item>) -> IO(List<&2, Web.Got>):
116 match fs:
117 case []:
118 IO.pure(List<&2, Web.Got>, [])
119 case +h <> t:
120 do IO<List<&2, Web.Got>>:
121 g : Web.Got <- Net.fetch(L.url_of(hub, hash, K.file.at(h)), K.file.sum(h))
122 rest : List<&2, Web.Got> <- hub.all(hub, hash, t)
123 return g <> rest