From ac47f39ea39647cfa68f76bf6c5b1669f0dff786 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sun, 5 Feb 2023 10:04:20 -0800 Subject: [PATCH] Remove def of clear. It's a neat example of a custom implementation being more efficient than the Joy code. --- implementations/C/joy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/implementations/C/joy.c b/implementations/C/joy.c index 87c7184..f7a6079 100644 --- a/implementations/C/joy.c +++ b/implementations/C/joy.c @@ -684,7 +684,6 @@ JoyList def_b_body; JoyList def_binary_body; JoyList def_ccccons_body; JoyList def_ccons_body; -JoyList def_clear_body; JoyList def_cleave_body; JoyList def_clop_body; JoyList def_cmp_body; @@ -707,7 +706,6 @@ void def_b(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { pu void def_binary(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_binary_body, expression); } void def_ccccons(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_ccccons_body, expression); } void def_ccons(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_ccons_body, expression); } -void def_clear(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_clear_body, expression); } void def_cleave(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_cleave_body, expression); } void def_clop(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_clop_body, expression); } void def_cmp(__attribute__((unused)) JoyListPtr stack, JoyListPtr expression) { push_quote(def_cmp_body, expression); } @@ -733,7 +731,6 @@ init_defs(void) def_binary_body = text_to_expression("unary popd"); def_ccccons_body = text_to_expression("ccons ccons"); def_ccons_body = text_to_expression("cons cons"); - def_clear_body = text_to_expression("[] swaack pop"); def_cleave_body = text_to_expression("fork popdd"); def_clop_body = text_to_expression("cleave popdd"); def_cmp_body = text_to_expression("[[>] swap] dipd [ifte] ccons [=] swons ifte");