Css.css.insert: def of gralha-css-style@0.1.0.1 Import: import gralha-css-style@0.1.0.1/css.bend as Css Lines 406-413 of gralha-css-style@0.1.0.1/css.bend: https://jend.leeeet.dev/read.txt?path=gralha-css-style@0.1.0.1/css.bend&start_line=406&end_line=413 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def css.insert(+value: CSSChoice, +xs: List<&2, CSSChoice>) -> List<&2, CSSChoice>: CSSChoice{nk, nv, ni, nw} = value match xs: case Nil{}: Con{value, Nil{}} case Con{CSSChoice{k, v, imp, weight}, rest}: +old = {CSSChoice{k, v, imp, weight} : CSSChoice} U.branch(List<&2, CSSChoice>, U.string.equal(nk, k), _ => Con{U.choose(CSSChoice, css.wins(value, old), value, old), rest}, _ => Con{old, css.insert(value, rest)}) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=CSSChoice https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.wins https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=string.equal