def nonempty
import ezx@1.11.0.0/src/share/args.bend as Argsimport 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)