def owned_ports

near-v-framework@0.4.0.0 · domain/architecture/system/deployment/nix_darwin/effects.bend:116

import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/effects.bend as Effects
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as X

116# Ports that V's processes listen on.
117def owned_ports(xs: List<&2, String>, +owned: List<&2, String>) -> List<&2, String>:
118  match xs:
119    case []:
120      []
121    case +x <> rest:
122      X.keep_filled(List.contains(~String, ~String.eq, owned, part(x, 0n)), last_of(part(x, 2n), ':'), owned_ports(rest, owned))

Uses (8)

Used by (1)