def owns
import yaml-for-bend@0.1.1.0/compose.bend as Composeimport Base
242# The mapping's own entries, each key once.
243def owns(items: List<&2, Item>, r: Result<&2, &2, String, Ord>) -> Result<&2, &2, String, Ord>:
244 match items:
245 case Nil{}:
246 r
247 case Con{k, more}:
248 match more:
249 case Nil{}:
250 r
251 case Con{v, rest}:
252 owns(rest, own.step(r, k, v))