Hi Mark, Please ignore my previous message, I’ve been reading them in the wrong order. ;-)
Mark H Weaver <m...@netris.org> skribis: > (not v) is not the same as (equal? #f v) when v is #nil. [...] > (null? v) is not the same as (equal? '() v) when v is #nil. Ah right, I had thought about #nil, but missed those. >> + ((or (eq? #t v) >> + (eq? #nil v) >> + (symbol? v) >> + (and (integer? v) >> + (<= v most-positive-fixnum) >> + (>= v most-negative-fixnum))) >> + (make-application src (make-primitive-ref #f 'eq?) >> + (list a b))) > > 42.0 is an integer in the fixnum range, but (eq? 42.0 v) is not the same > as (equal? 42.0 v). Right, thanks! > Also, is there any particular reason you didn't apply the same > optimizations to 'eqv?'? No particular reason, feel free to add it. I was interested in ‘equal?’, because that’s what ‘match’ uses. Thanks, Ludo’.