aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-03-28 16:21:16 +0100
committerAkshay <[email protected]>2021-03-28 16:21:16 +0100
commit4e0907549f3fe4d949b375cc4c6cd58b14376dfe (patch)
tree268fb2e5333f3ab557c0c1d68f4578025352e5c7 /src/lisp
parent6f40ddc6eb92acd24101e7fe0ecc773ab7e6f4f9 (diff)
fix arity of arithmetic comparison operators
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/prelude.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lisp/prelude.rs b/src/lisp/prelude.rs
index bdaf639..3b8f151 100644
--- a/src/lisp/prelude.rs
+++ b/src/lisp/prelude.rs
@@ -127,7 +127,7 @@ pub fn new_env() -> Environment {
127 result.map(LispExpr::BoolLit) 127 result.map(LispExpr::BoolLit)
128 }); 128 });
129 129
130 primitive!(env, Arity::Exact(2), ">", |args, _| { 130 primitive!(env, Arity::Atleast(2), ">", |args, _| {
131 let nums = args 131 let nums = args
132 .into_iter() 132 .into_iter()
133 .map(|arg| arg.try_into()) 133 .map(|arg| arg.try_into())
@@ -138,7 +138,7 @@ pub fn new_env() -> Environment {
138 )) 138 ))
139 }); 139 });
140 140
141 primitive!(env, Arity::Exact(2), ">=", |args, _| { 141 primitive!(env, Arity::Atleast(2), ">=", |args, _| {
142 let nums = args 142 let nums = args
143 .into_iter() 143 .into_iter()
144 .map(|arg| arg.try_into()) 144 .map(|arg| arg.try_into())
@@ -149,7 +149,7 @@ pub fn new_env() -> Environment {
149 )) 149 ))
150 }); 150 });
151 151
152 primitive!(env, Arity::Exact(2), "<", |args, _| { 152 primitive!(env, Arity::Atleast(2), "<", |args, _| {
153 let nums = args 153 let nums = args
154 .into_iter() 154 .into_iter()
155 .map(|arg| arg.try_into()) 155 .map(|arg| arg.try_into())
@@ -160,7 +160,7 @@ pub fn new_env() -> Environment {
160 )) 160 ))
161 }); 161 });
162 162
163 primitive!(env, Arity::Exact(2), "<=", |args, _| { 163 primitive!(env, Arity::Atleast(2), "<=", |args, _| {
164 let nums = args 164 let nums = args
165 .into_iter() 165 .into_iter()
166 .map(|arg| arg.try_into()) 166 .map(|arg| arg.try_into())