def text.split.push

ezsys@0.1.0.0 · src/str.bend:138

import ezsys@0.1.0.0/src/str.bend as Str
import Base

138# a character on the front of the first piece
139def text.split.push(hd: Char, ps: List<&2, String>) -> List<&2, String>:
140  match ps:
141    case Nil{}:
142      [SCon{hd, SNil{}}]
143    case p <> rest:
144      SCon{hd, p} <> rest

Uses (3)

Used by (1)