def stack.add

gralha-xml-doc@0.1.0.1 · xml.bend:244

import gralha-xml-doc@0.1.0.1/xml.bend as Xml
import Base

244def stack.add(s: List<&2, Element>, node: Element) -> List<&2, Element>:
245  match s:
246    case Nil{}: Con{Element{"#document", Nil{}, Con{node, Nil{}}, ""}, Nil{}}
247    case Con{Element{n, a, kids, txt}, rest}:
248      Con{Element{n, a, Con{node, kids}, txt}, rest}

Uses (2)

Used by (3)