def attrs.take
import gralha-xml-doc@0.1.0.1/xml.bend as Xmlimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
409def attrs.take(as: List<&2, Attr>, +key: String) -> Taken:
410 match as:
411 case Nil{}: Taken{"", Nil{}}
412 case Con{Attr{k, v}, rest}:
413 +kk = k
414 attrs.take.go(U.string.equal(kk, key), kk, v, rest, key)