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
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
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
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
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