improve '$skip_max_list'/4 and length/2 (#1023, #110)

This commit is contained in:
Mark Thom
2022-01-29 00:57:39 -07:00
parent b3006f6fd8
commit 0d653a2ce6
9 changed files with 146 additions and 121 deletions

View File

@@ -649,6 +649,14 @@ impl Number {
&Number::Rational(ref r) => &**r == &0,
}
}
#[inline]
pub(crate) fn is_integer(&self) -> bool {
match self {
Number::Fixnum(_) | Number::Integer(_) => true,
_ => false,
}
}
}
#[derive(Debug, Clone)]