def run_of
import bolt@1.27.0.0/src/syntax/word.bend as Wordimport Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
145# the leading run of name chars
146def run_of(cs: List<&2, Char>) -> List<&2, Char>:
147 match cs:
148 case Nil{}:
149 Nil{}
150 case Con{+c, t}:
151 Lazy.stop(List<&2, Char>, Bool.not(is_name(c)), Nil{}, _u => c <> run_of(t))