filter-to[generic] filter-to class pred collection
[generic] remove-to class pred collection
[generic] partition-to class pred collection
Gauche: generic versions of filter, remove, and partition,
with which you can specify the type of the result collection.
(filter-to <vector> even? '#(1 2 3 4)) => #(2 4)
(filter-to <string> char-upper-case? "Hello, World")
=> "HW"
See also map-to, coerce-to.
|