def nonempty

ezx@1.11.0.0 · src/share/args.bend:13

import ezx@1.11.0.0/src/share/args.bend as Args
import Base

13# the non-empty strings
14def nonempty(ss: List<&2, String>) -> List<&2, String>:
15  match ss:
16    case Nil{}:
17      Nil{}
18    case Con{+h, t}:
19      +more = nonempty(t)
20      Bool.pick(List<&2, String>, String.is_empty(h), more, h <> more)

Uses (4)

Used by (2)