]> git.eli173.com Git - klapaucius/commitdiff
fixed a whoopsie, added demos file
authorElijah Cohen <eli@eli173.com>
Thu, 3 Oct 2024 22:00:34 +0000 (17:00 -0500)
committerElijah Cohen <eli@eli173.com>
Thu, 3 Oct 2024 22:00:34 +0000 (17:00 -0500)
(with only factorial for now)

demos.kl [new file with mode: 0644]
src/builtins.c

diff --git a/demos.kl b/demos.kl
new file mode 100644 (file)
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
index c74cbad6bf7837a38a7be2a83de7dc36e266ad06..28748765b3efb84131b2b6088c3dfc7348a29360 100644 (file)
@@ -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)";
                }