def route_pick
import cli@0.2.0.0/cli.bend as Cliimport Base
4877def route_pick(-A: Type, routes: (List<&2, String> & List<Call(A)>),
4878 m: Matches) -> Dec(A):
4879 (+keys, calls) = routes
4880 match m:
4881 case Matches{+cmd, +path, fields, external}:
4882 route_found(A,
4883 find_by_key(&1, Call(A), keys, calls, String.join(path, " ")),
4884 keys, cmd, path, Matches{cmd, path, fields, external})