def answer.all

ezx@1.11.0.0 · src/fetch/run.bend:66

import ezx@1.11.0.0/src/fetch/run.bend as Run
import Base
import ezx@1.11.0.0/src/fetch/world.bend as FW

66# every question, answered
67def answer.all(+lib: String, asks: List<&2, FW.Ask>) -> IO(List<&2, FW.Reply>):
68  match asks:
69    case []:
70      IO.pure(List<&2, FW.Reply>, [])
71    case +h <> t:
72      do IO<List<&2, FW.Reply>>:
73        a : FW.Answer <- answer(lib, h)
74        rest : List<&2, FW.Reply> <- answer.all(lib, t)
75        return FW.Reply{h, a} <> rest

Uses (9)

Used by (1)