def heard

ezx@1.11.0.0 · src/add/hub.bend:71

import ezx@1.11.0.0/src/add/hub.bend as Hub
import Base
import ezx@1.11.0.0/src/lock/world.bend as W

71# the answer the World holds for a question about this key: a name, or a
72# package's hash
73def heard(rs: List<&2, W.Reply>, +key: String) -> Maybe<&2, W.Answer>:
74  match rs:
75    case []:
76      None{}
77    case W.Reply{ask, answer} <> t:
78      heard.at(String.eq(W.ask.hash(ask), key), answer, _u => heard(t, key))

Uses (8)

Used by (2)