3 ms·
Close, except trues returns the values returned by the function, not the elements for which the function returned true. (def keep (f seq) (rem [no (f _)] seq
by pg 19y ago
Close, except trues returns the values returned by the function, not the elements for which the function returned true.
(def keep (f seq) (rem [no (f _)] seq))
(def trues (f seq) (rem nil (map f seq)))