[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sequence function predicate arg order
Date: Friday, 7 September 1984, 15:34-EDT
From: Bernard S. Greenberg <BSG at SCRC-TENEX>
The following issue was encountered today by David Andre. He wanted
to find the position of first element in a string which was not an element of a list
he had in hand....
Possible outcomes:
1. Magic keyword to sequence functions to reverse test arg order? ECCH!
2. More string-specific primitives.
3. Maybe he should have said :test #'(lambda (x y)(member y x)).
Among your alternatives, I'd prefer #3, i.e. write
(position list sequence :test-not #'(lambda (x y) (member y x)))
I would actually write
(position-if-not #'(lambda (item) (member item list)) sequence)