def marker.instances.loop
gralha-svg-render@0.1.0.1 · svg.bend:3074
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-xml-doc@0.1.0.1/xml.bend as XML
3074def marker.instances.loop(xs: List<&2, MarkerVertex>, +first: Bool, +ms: MarkerStyle, +all: List<&2, XML.Element>, +active: List<&2, String>, +width: F32, +w: F32, +h: F32) -> List<&2, XML.Element>:
3075 match xs:
3076 case Nil{}: Nil{}
3077 case Con{vertex, Nil{}}:
3078 MarkerStyle{start, middle, end} = ms
3079 +v = vertex
3080 marker.elements.append(U.branch(List<&2, XML.Element>, first, _ => marker.instance(start, v, True{}, all, active, width, w, h), _ => Nil{}), marker.instance(end, v, False{}, all, active, width, w, h))
3081 case Con{vertex, Con{head, tail}}:
3082 MarkerStyle{start, middle, end} = ms
3083 marker.elements.append(marker.instance(U.choose(String, first, start, middle), vertex, first, all, active, width, w, h), marker.instances.loop(Con{head, tail}, False{}, ms, all, active, width, w, h))