def removals
near-v-framework@0.4.0.0 · domain/architecture/system/deployment/nix_darwin/brew/effects.bend:63
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/brew/effects.bend as Effects
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/plan/type.bend as P
63def removals(ls: List<&2, String>, +label: String) -> List<&2, P.Step>:
64 match ls:
65 case []:
66 []
67 case l <> rest:
68 +t = String.trim(l)
69 +next = section(t, label)
70 List.append(&2, P.Step,
71 Bool.pick(List<&2, P.Step>, Bool.not(String.is_empty(label)) && String.eq(next, label) && Bool.not(String.is_empty(t)),
72 [P.Change{"homebrew", label ++ " " ++ t, "(absent)"}], []),
73 removals(rest, next))