Dieter Kaiser wrote:
> Am Donnerstag, den 11.06.2009, 18:36 -0400 schrieb Raymond Toy:
>
>> Dieter Kaiser wrote:
>>
>>> I would like to suggest to improve the Maxima user function apropos.
>>> This is the last result of some work to get a working function apropos:
>>>
>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>>
>>> ;;; Utility function to filter a list LST with a function FN
>>> ;;; e.g. (filter #'(lambda(x) (if (oddp x) x)) '(1 2 3 4 5 6 7)) --> (1
>>> 3 5 7)
>>>
>>>
>> I think this is called remove-if-not. :-)
>>
>
> Hello Ray,
>
> yes, of course it is remove-if-not. You see, I have not many years of
> experience.
> The Common Lisp Hyper Spec says that this function is deprecated. Do you
> know the best alternative construct?
>
>
>
I doubt the spec will ever be updated, so remove-if-not will never
actually be removed. And I have heard from experienced Lispers that the
next revision probably would un-deprecate it because it is quite useful.
An alternative would be (remove-if (complement 'fun) list). But
remove-if-not seems simpler. Or keep the function filter but call
remove-if-not (or remove-if) instead of implementing it yourself.
Ray