def is_collection

yaml-for-bend@0.1.1.0 · emit.bend:167

import yaml-for-bend@0.1.1.0/emit.bend as Emit
import Base
import yaml-for-bend@0.1.1.0/value.bend as V

167def is_collection(v: V.Yaml) -> Bool:
168  match v:
169    case V.Seq{xs}:
170      Bool.not(List.is_empty(&2, V.Yaml, xs))
171    case V.Mapping{es}:
172      Bool.not(List.is_empty(&2, V.Entry, es))
173    case _:
174      False{}

Uses (5)

Used by (1)