From 4e0907549f3fe4d949b375cc4c6cd58b14376dfe Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Mar 2021 20:51:16 +0530 Subject: fix arity of arithmetic comparison operators --- src/lisp/prelude.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 { result.map(LispExpr::BoolLit) }); - primitive!(env, Arity::Exact(2), ">", |args, _| { + primitive!(env, Arity::Atleast(2), ">", |args, _| { let nums = args .into_iter() .map(|arg| arg.try_into()) @@ -138,7 +138,7 @@ pub fn new_env() -> Environment { )) }); - primitive!(env, Arity::Exact(2), ">=", |args, _| { + primitive!(env, Arity::Atleast(2), ">=", |args, _| { let nums = args .into_iter() .map(|arg| arg.try_into()) @@ -149,7 +149,7 @@ pub fn new_env() -> Environment { )) }); - primitive!(env, Arity::Exact(2), "<", |args, _| { + primitive!(env, Arity::Atleast(2), "<", |args, _| { let nums = args .into_iter() .map(|arg| arg.try_into()) @@ -160,7 +160,7 @@ pub fn new_env() -> Environment { )) }); - primitive!(env, Arity::Exact(2), "<=", |args, _| { + primitive!(env, Arity::Atleast(2), "<=", |args, _| { let nums = args .into_iter() .map(|arg| arg.try_into()) -- cgit v1.2.3