:title
Filter strings

:sig
function filter(items : dval, predicate : function(value : string) bool) dval

:returns
This function returns a new list-shaped `dval`.

:content
`filter` keeps the strings for which `predicate` returns `true`.

The result keeps input order. This function does not change `items`.

:example capy render
var items := split("one,two", ",")
var kept := filter(items, function(value : string) bool { return value == "two" })
print(join(kept, ","), "\n")

:see-group
collections
