def span_word
import cswap-bend-cli@0.1.0.0/json/lex.bend as Leximport Base
57# Leading run of word characters.
58def span_word(s: String, ok: Bool) -> Nat:
59 match s ok:
60 case SCon{c, +t} True{}:
61 1n+span_word(t, head_word(t))
62 case _ _:
63 0n