[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What *is* this total horse-shit?



(selectq x (y z)) ==>

((LAMBDA (|NumP..1|) 
   (SETQ |NumP..1| (MEMQ (TYPEP X) '(FIXNUM FLONUM)))
   (COND ((AND (NOT |NumP..1|) (EQ X Y)) Z)))
 NIL)

Worse is (selectq x ((3 y) z)) ==>

((LAMBDA (|NumP..3|) 
   (SETQ |NumP..3| (MEMQ (TYPEP X) '(FIXNUM FLONUM)))
   (COND ((OR (AND |NumP..3| (= X 3)) (AND (NOT |NumP..3|) (EQ X Y))) Z)))
 NIL)

[1] The code is broken, screwing lots of people. Please test these things.
[2] Since when does maclisp support the use of EQ on FIXNUMs?
    SELECTQ is defined to use EQ is it not? If somebody wants a
    selector in maclisp to work on both atoms and numbers then
    they can define one to use EQUAL.

-gjc