def cluster

shake@0.7.0.0 · src/cli.bend:962

import shake@0.7.0.0/src/cli.bend as Cli
import Base

962# every letter of a short cluster `-abc`, in order: a flag binds and the next
963# letter goes on; an option takes the rest of the word, after one `=`, or the
964# next word when nothing is left; an unknown letter, or a flag given `=`,
965# refuses the whole word
966def cluster(body: String, +orig: String, +st: St, +done: Bool) -> St:
967  match body:
968    case SNil{}:
969      st
970    case SCon{+cc, +rest}:
971      cluster(rest, orig, cluster.letter(done, cc, rest, orig, st), cluster.done(done, cc, rest, st))

Uses (5)

Used by (1)