def answer.all

ezx@1.11.0.0 · src/lock/run.bend:292

import ezx@1.11.0.0/src/lock/run.bend as Run
import Base
import ezx@1.11.0.0/src/lock/world.bend as W

292# every question, answered
293def answer.all(+lib: String, asks: List<&2, W.Ask>) -> IO(List<&2, W.Reply>):
294  match asks:
295    case []:
296      IO.pure(List<&2, W.Reply>, [])
297    case +h <> t:
298      do IO<List<&2, W.Reply>>:
299        a : W.Answer <- answer(lib, h)
300        rest : List<&2, W.Reply> <- answer.all(lib, t)
301        return W.Reply{h, a} <> rest

Uses (9)

Used by (3)