def reports_to

near-architecture@0.9.1.0 · arc.bend:591

import near-architecture@0.9.1.0/arc.bend as Arc
import Base

591# Some link from container `k` (or one of its parts) reaches one of `obs`.
592def reports_to(ls: List<&2, Link>, +k: String, +ps: List<&2, Part>, +obs: List<&2, String>) -> Bool:
593  match ls:
594    case []:
595      False{}
596    case Link{src, dst, _, _} <> rest:
597      (str_eq(k, part_container(ps, src)) && has(dst, obs)) || reports_to(rest, k, ps, obs)

Uses (10)

Used by (1)