Tom Smith said the following on 8/25/2007 1:05 PM:
> A cleaner way to do the same sequential test would be:
>
> (and
> (= 1 1)
> (= 2 2)
> (= 3 3)
> (= 4 5)
> (= 6 6)
> (princ "all true")
> )
True, but since the OP asked about "multiple if statements", I was just
showing that it *can* be done.
Just for grins, I ran both versions, using the same timer for 1,000,000
iterations each.
The (if) version averaged about 2.55 seconds
The (and) version averaged about 2.45 seconds.
--
R.K. McSwain
http://rkmcswain.blogspot.com