def head_named

cli@0.2.0.0 · cli.bend:2627

import cli@0.2.0.0/cli.bend as Cli
import 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)

Uses (5)

Used by (3)