chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] case vs. eq? - just curious ....


From: Matt Welland
Subject: [Chicken-users] case vs. eq? - just curious ....
Date: Fri, 2 Mar 2012 16:52:29 -0700

I expected this to work:

(define (comp->text comp)
  (case comp
   ((=)    "=")
   ((>)    ">")
   ((<)    "<")
   ((>=)  ">=")
   ((<=)  "<=")
   (else "unk")))

But had to convert to a cond with (eq? comp =) etc...

I thought case was supposed to use eq? to do the compare?

Thanks,

M a t t
-=-

reply via email to

[Prev in Thread] Current Thread [Next in Thread]