From d982eabb201e837a0e5d4574c36a6de124153962 Mon Sep 17 00:00:00 2001 From: Elijah Cohen Date: Thu, 3 Oct 2024 17:00:34 -0500 Subject: [PATCH] fixed a whoopsie, added demos file (with only factorial for now) --- demos.kl | 5 +++++ src/builtins.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 demos.kl diff --git a/demos.kl b/demos.kl new file mode 100644 index 0000000..5ac7f56 --- /dev/null +++ b/demos.kl @@ -0,0 +1,5 @@ +(def D (B B)) + +(def g (D S (C (eq 0) 1) (D S * (C B (C - 1))))) + +(def fac (Z g)) \ No newline at end of file diff --git a/src/builtins.c b/src/builtins.c index c74cbad..2874876 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -182,8 +182,8 @@ char* lookup_builtin(Sexpr* b) { switch(suffix) { case IO_PRINT: return IO_PRINT_STR; - case IO_BPA: - return IO_BPA_STR; + case IO_PB: + return IO_PB_STR; default: return "NOT FOUND (IO)"; } -- 2.39.2