Friedrich Dominicus wrote:
> Thaddeus L Olczyk <
olc...@interaccess.com> writes:
>
> > Is there a statement somthing like collect-if in the loop construct?
> >
> > For example:
> > (loop x in list
> > collect-if (not (= (property x) 0))
> > (process x))
>
> (defun test-it (liste)
> (loop for item in liste
> when (>= item 0) collect item into result
> finally (return result)))
* (remove-if #'minusp '(-3 0 -2 4))
(0 4)
Clojure:
user=> (remove neg? '(-3 0 -2 4))
(0 4)
Racket:
> (filter-not negative? '(-3 0 -2 4))
'(0 4)