justinethier / cyclone

:cyclone: A brand-new compiler that allows practical application development using R7RS Scheme. We provide modern features and a stable system capable of generating fast native binaries.
http://justinethier.github.io/cyclone/
MIT License
823 stars 42 forks source link

Cyclone says 1.5 is an odd number #501

Closed jpellegrini closed 1 year ago

jpellegrini commented 1 year ago

Hello!

I just noticed Cyclone returns this:

(odd? 1.5)  => #t
(even? 1.5) => #f

Most Schemes signal an error on both. I would guess that it would be ok to answer #f for both... But It's currently saying 1.5 is odd. :)

justinethier commented 1 year ago

Good catch @jpellegrini! Thanks for the bug report.

Cyclone will now throw an error if a non-integer is passed to these functions.