From: John Connors
Subject: Minor lisp whinges.
Date: 
Message-ID: <cr8ftp$uoi$2@newsg1.svr.pol.co.uk>
Two small (very small) annoyances.

* Why is there no logiorf logiandf to match incf, decf? They would 
compile to a more compact machine code too in the right context, unless 
the compiler is smart enough to recognise (setf thing (logior thing 1)))
and do the right thing, which I suppose it is..

* Why can't zerop take multiple parameters, it'd be a much more compact 
way of testng a swathe of values for zero, which is sometimes useful..


-- 
Cyborg Animation Programmer
http://yagc.blogspot.com
http://badbyteblues.blogspot.com

From: David Sletten
Subject: Re: Minor lisp whinges.
Date: 
Message-ID: <FhQBd.55886$gd.11517@twister.socal.rr.com>
John Connors wrote:

> 
> Two small (very small) annoyances.
> 
> * Why is there no logiorf logiandf to match incf, decf? They would 
> compile to a more compact machine code too in the right context, unless 
> the compiler is smart enough to recognise (setf thing (logior thing 1)))
> and do the right thing, which I suppose it is..
> 
Voila:
(define-modify-macro logiorf (y) logior)
(define-modify-macro logandf (y) logand)

> * Why can't zerop take multiple parameters, it'd be a much more compact 
> way of testng a swathe of values for zero, which is sometimes useful..
> 
> 
I'm not sure specifically what you want here--
(mapcar #'zerop '(8 -1 0 3 0 12 0))
(every #'zerop '(8 -1 0 3 0 12 0))
(count-if #'zerop '(8 -1 0 3 0 12 0))

David Sletten
From: Alexander Schmolck
Subject: Re: Minor lisp whinges.
Date: 
Message-ID: <yfsacrsdnvh.fsf@black4.ex.ac.uk>
John Connors <·····@yagc.dot.ndo.dot.co.dot.uk> writes:
> * Why can't zerop take multiple parameters, it'd be a much more compact way
>   of testng a swathe of values for zero, which is sometimes useful..

(= 0 a b c d e ...)

'as
From: Peter Seibel
Subject: Re: Minor lisp whinges.
Date: 
Message-ID: <m33bxj3k6f.fsf@javamonkey.com>
John Connors <·····@yagc.dot.ndo.dot.co.dot.uk> writes:

> * Why can't zerop take multiple parameters, it'd be a much more
> compact way of testng a swathe of values for zero, which is
> sometimes useful..

Try (= 0 x y z ...)

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: John Connors
Subject: Re: Minor lisp whinges.
Date: 
Message-ID: <cr9e1c$blu$1@newsg4.svr.pol.co.uk>
Ok, I get the idea ;) Thanks, everyone..

Peter Seibel wrote:
> John Connors <·····@yagc.dot.ndo.dot.co.dot.uk> writes:
> 
> 
>>* Why can't zerop take multiple parameters, it'd be a much more
>>compact way of testng a swathe of values for zero, which is
>>sometimes useful..
> 
> 
> Try (= 0 x y z ...)
> 
> -Peter
> 


-- 
Cyborg Animation Programmer
http://yagc.blogspot.com
http://badbyteblues.blogspot.com