Added the env and evaluation for addition and subtraction functions

This commit is contained in:
Chris Cochrun 2024-11-06 13:24:25 -06:00
parent 7f7aae2f63
commit ba5b02074d
4 changed files with 101 additions and 26 deletions

View file

@ -88,6 +88,18 @@ impl From<&String> for Value {
}
}
impl From<i64> for Value {
fn from(num: i64) -> Self {
Self::Number(num)
}
}
impl From<&i64> for Value {
fn from(num: &i64) -> Self {
Self::Number(*num)
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct Symbol(pub String);