Added the env and evaluation for addition and subtraction functions
This commit is contained in:
parent
7f7aae2f63
commit
ba5b02074d
4 changed files with 101 additions and 26 deletions
12
src/types.rs
12
src/types.rs
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue