def halve.at

ezx@1.11.0.0 · src/ez/target.bend:163

import ezx@1.11.0.0/src/ez/target.bend as Target
import Base

163# one char of the first segment. A slash ends it; the rest of the word is
164# asked about only past a char a segment may hold.
165def halve.at(mark: Mark, ch: Char, +tail: String, rest: Unit -> Halves) -> Halves:
166  match mark:
167    case Slash{}:
168      Two{"", tail}
169    case Word{}:
170      halve.put(ch, rest(Unit{}))
171    case Dot{}:
172      halve.put(ch, rest(Unit{}))
173    case Tilde{}:
174      Uncut{}
175    case Other{}:
176      Uncut{}

Uses (6)

Used by (1)