<div dir="ltr">Up with a horrible ear-ache this morning I decided to include a FizzBuzz example in Heresy, the Racket #lang I've been working on, and ran into an unexpected behavior in the (case ...) statement.<div><br></div><div>In many languages with case, you can make the testing value a constant, and then make the matching clauses actual calculations which then match against that constant. So when doing FizzBuzz in C-like languages you can do something like "switch 0" and then "case x % 3" for the matching clauses.</div><div><br></div><div>It turns out this doesn't work in Racket, because Racket quotes the values in the matching clauses so they do not evaluate. Specifically, it narrows down to doing this in (case/sequential-test ...): #`(equal? v 'k)</div><div><br></div><div>I can implement an alternate version that works as I expect (and will probably include it in Heresy) just by removing that quote in my version, but I was curious as to the reasoning behind this behavior and if perhaps there's some explanation for it that I may've missed.</div><div><br></div><div>Any insights appreciated,</div><div>John Berry </div><div><br></div></div>