From e068d45199bb23452821727e5b82a2307ae0256d Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Wed, 13 Oct 2021 17:18:31 +0200 Subject: Add eq? primitive procedure --- src/bootstrap/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/bootstrap/main.c') diff --git a/src/bootstrap/main.c b/src/bootstrap/main.c index 8092bbd..945e121 100755 --- a/src/bootstrap/main.c +++ b/src/bootstrap/main.c @@ -14,6 +14,10 @@ #include "environment.c" #include "primitives.c" +// +// Utility macros. +// + #define MAKE_SYM(STR) make_symbol((StringView){(STR), sizeof(STR) - 1}) #define MAKE_ENV_VAR(ENV,STR,VAR) \ (env_add_symbol((ENV), MAKE_SYM(STR), (VAR))) @@ -66,6 +70,7 @@ init(void) { MAKE_ENV_PROC(global_env, ">", proc_num_greater_than); MAKE_ENV_PROC(global_env, ">=", proc_num_greatereq_than); MAKE_ENV_PROC(global_env, "=", proc_num_equal); + MAKE_ENV_PROC(global_env, "eq?", proc_equal); } void -- cgit v1.2.1