def part_container

near-architecture@0.9.1.0 · arc.bend:583

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

583# The container a link end belongs to: a part's container, else the key itself.
584def part_container(ps: List<&2, Part>, +k: String) -> String:
585  match ps:
586    case []:
587      k
588    case +p <> rest:
589      pick_str(str_eq(k, pkey(p)), pin(p), part_container(rest, k))

Uses (7)

Used by (1)