Effeciency of any predicate
- From: "S. Robert James" <srobertjames@xxxxxxxxx>
- Date: 27 Feb 2007 12:23:48 -0800
Is there a more efficient way of doing this:
(defun any? (predicate lst)
(if (null lst)
nil
(or (funcall predicate (car lst))
(any? predicate (cdr lst)))))
Does common Lisp have a built in which can reach the same goal?
.
- Follow-Ups:
- Re: Effeciency of any predicate
- From: André Thieme
- Re: Effeciency of any predicate
- From: Vassil Nikolov
- Re: Effeciency of any predicate
- From: Pascal Costanza
- Re: Effeciency of any predicate
- From: Zach Beane
- Re: Effeciency of any predicate
- Prev by Date: Re: Optimizing sort-algorithm
- Next by Date: Re: Effeciency of any predicate
- Previous by thread: Optimizing sort-algorithm
- Next by thread: Re: Effeciency of any predicate
- Index(es):
Relevant Pages
|
|