def merge.list
import yaml-for-bend@0.1.1.0/compose.bend as Composeimport Base
import yaml-for-bend@0.1.1.0/value.bend as V
159# A list of mappings merged, the earlier winning.
160def merge.list(xs: List<&2, V.Yaml>, +o: Ord) -> Result<&2, &2, String, Ord>:
161 match xs:
162 case Nil{}:
163 Done{o}
164 case Con{x, rest}:
165 match x:
166 case V.Mapping{es}:
167 merge.list(rest, ord.fill(es, o))
168 case _:
169 Fail{"found a merge value that isn't a mapping or a list of mappings"}