Closed fominok closed 4 months ago
Just seems like an oversight in the implementation, and that integer?
should check if the value can be coerced to an integer. As it is now I think integer?
and exact-integer?
share behavior, where integer?
should be more specialized:
#[steel_derive::function(name = "int?", constant = true)]
fn intp(value: &SteelVal) -> bool {
matches!(value, SteelVal::IntV(_) | SteelVal::BigNum(_))
}
#[steel_derive::function(name = "integer?", constant = true)]
fn integerp(value: &SteelVal) -> bool {
intp(value)
}
So I think we should have to check when it is a float if the value of the fract is 0.0
Fixed in #214
Hello, I've noticed a behaviour incompatible with Scheme and I'm not sure whether it's intended or not:
Hence
exact-integer?
makes no sense anymore