def word.chars

yaml-for-bend@0.1.1.0 · scan.bend:1211

import yaml-for-bend@0.1.1.0/scan.bend as Scan
import Base

1211def word.chars(s: String) -> Taken:
1212  match s:
1213    case SNil{}:
1214      Taken{"", 0n}
1215    case SCon{+c, t}:
1216      took.or(Bool.not(is_word(c)), u => taken.cons(c, 1n, word.chars(t)))

Uses (6)

Used by (3)