(declare (compiler-macro (lambda (_) `(= 0 ,number))))
(= 0 number))
+ (defun fixnump (object)
+ "Return t if OBJECT is a fixnum."
+ (and (integerp object)
+ (<= most-negative-fixnum object most-positive-fixnum)))
+
+ (defun bignump (object)
+ "Return t if OBJECT is a bignum."
+ (and (integerp object) (not (fixnump object))))
+
+ (defun lsh (value count)
+ "Return VALUE with its bits shifted left by COUNT.
+ If COUNT is negative, shifting is actually to the right.
+ In this case, if VALUE is a negative fixnum treat it as unsigned,
+ i.e., subtract 2 * most-negative-fixnum from VALUE before shifting it."
+ (when (and (< value 0) (< count 0))
+ (when (< value most-negative-fixnum)
+ (signal 'args-out-of-range (list value count)))
+ (setq value (logand (ash value -1) most-positive-fixnum))
+ (setq count (1+ count)))
+ (ash value count))
+
+(defun xor (pred1 pred2)
+ "Return the logical exclusive or of predicates PRED1 and PRED2."
+ (and (or pred1 pred2)
+ (not (and pred1 pred2))))
+
\f
;;;; List functions.