def words.keep

ezx@1.11.0.0 · src/pkg/pkg.bend:46

import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg
import Base

46# the words of a line, with the runs of spaces dropped
47def words.keep(ws: List<&2, String>) -> List<&2, String>:
48  match ws:
49    case []:
50      []
51    case Con{+h, t}:
52      +more = words.keep(t)
53      Bool.pick(List<&2, String>, String.is_empty(h), more, h <> more)

Uses (4)

Used by (1)