def unzip_keyed

cli@0.2.0.0 · cli.bend:4736

import cli@0.2.0.0/cli.bend as Cli
import Base

4736# A choose or route table as its keys and its values.
4737def unzip_keyed(a, -A: Kind(a), table: List<(String & A)>) ->
4738    (List<&2, String> & List<a, A>):
4739  match table:
4740    case Nil{}: ([], [])
4741    case entry <> tail:
4742      (key, value) = entry
4743      keyed_cons(a, A, key, value, unzip_keyed(a, A, tail))

Uses (5)

Used by (3)