def run_of

bolt@1.27.0.0 · src/syntax/word.bend:145

import bolt@1.27.0.0/src/syntax/word.bend as Word
import 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))

Uses (5)

Used by (1)