Re: Question about loop
- From: "Alex Mizrahi" <udodenko@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 19:13:18 +0300
(message (Hello 'Jeff)
(you :wrote :on '(Wed, 30 May 2007 22:45:37 -0700))
(
JB> Does the Common Lisp spec say anything about whether the following is
JB> well defined given that the elements of "list" are unique:
JB> (loop for x in list
JB> when (p x)
JB> do (setq list (delete x list)))
i suspect it won't work right, but it's very confusing and very inefficient
anyway.
what's about one of this:
(delete-if #'p list)
(loop for x in lisp unless (p x) collect x)
(mapcan (lambda (x) (unless (p x) (list x))) list)
)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"I am everything you want and I am everything you need")
.
- References:
- Question about loop
- From: Jeff Barnett
- Question about loop
- Prev by Date: Re: code critique
- Next by Date: Re: Why I love Common Lisp : power! power! power!
- Previous by thread: Re: Question about loop
- Next by thread: Seattle in 2 weeks: Lisp and Symbolic Programming From the Beginning
- Index(es):
Relevant Pages
|