def answer.all

ezx@1.11.0.0 · src/doctor/run.bend:82

import ezx@1.11.0.0/src/doctor/run.bend as Run
import Base
import ezx@1.11.0.0/src/doctor/world.bend as DW

82# every question, answered
83def answer.all(+lib: String, asks: List<&2, DW.Ask>) -> IO(List<&2, DW.Reply>):
84  match asks:
85    case []:
86      IO.pure(List<&2, DW.Reply>, [])
87    case +h <> t:
88      do IO<List<&2, DW.Reply>>:
89        a : DW.Answer <- answer(lib, h)
90        rest : List<&2, DW.Reply> <- answer.all(lib, t)
91        return DW.Reply{h, a} <> rest

Uses (9)

Used by (1)