def collect

bend-kit-migrate@0.3.0.0 · migrate.bend:432

import bend-kit-migrate@0.3.0.0/migrate.bend as Migrate
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-json@0.7.0.0/json.bend as Json

432# Files each field under its key. An unknown or repeated key stops the walk.
433def collect(kvs: List<&1, Bytes.Bytes & Json.Val>, acc: Result<&1, &1, Error, Slots>) -> Result<&1, &1, Error, Slots>:
434  match kvs:
435    case Nil{}:
436      acc
437    case Con{(k, v), t}:
438      collect(t, collect.put(acc, k, v))

Uses (9)

Used by (1)