def head_named
import cli@0.2.0.0/cli.bend as Cliimport Base
2627# Whether keys' first key is named query. It only reads keys, so a walk
2628# that asks before it takes a key need not copy the keys it passes.
2629def head_named(keys: List<&2, OptKey>, +query: String) -> Bool:
2630 match keys:
2631 case Nil{}: False{}
2632 case OptKey{name, found} <> tail: same_text(query, name)