def answer.all

bolt@1.27.0.0 · src/lint.bend:51

import bolt@1.27.0.0/src/lint.bend as Lint
import Base
import bolt@1.27.0.0/src/lint/world.bend as W

51# every question, answered, in order
52def answer.all(asks: List<&2, W.Ask>) -> IO(List<&2, W.Reply>):
53  match asks:
54    case Nil{}:
55      IO.pure(List<&2, W.Reply>, [])
56    case Con{+ask, rest}:
57      do IO<List<&2, W.Reply>>:
58        a : W.Answer <- answer(ask)
59        more : List<&2, W.Reply> <- answer.all(rest)
60        return W.Reply{ask, a} <> more

Uses (8)

Used by (1)