13 Jan 1997 14:32
case w/ rational number failure
Jin S. Choi <jsc <at> atype.com>
1997-01-13 13:32:49 GMT
1997-01-13 13:32:49 GMT
Case fails when the key is an expression that evaluates to a rational number. This is with scheme48 as used in scsh 0.4 (s48 0.36). > (case 1/8 ((1/8) #t) (else #f)) #t > (case (string->number "1/8") ((1/8) #t) (else #f)) #f The ,expand command shows: > ,expand (case (string->number "1/8") ((1/8) #t) (else #f)) '((lambda (temp) (cond ((eq? temp '1/8) #t) (else #f))) (string->number "1/8")) That should be eqv?, according to R4RS.
RSS Feed