aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-06-20 18:20:15 +0800
committerMistivia <i@mistivia.com>2025-06-20 18:20:15 +0800
commit762e68ac1b2b9825b08d11fc00bafbac677d5354 (patch)
tree676504163c176ee162ea8325bbe0d18f8a9c5448
parent3cef9f993de2e0380c859d0e0ec88c07bfc3635f (diff)
add readme
-rw-r--r--Readme.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/Readme.md b/Readme.md
new file mode 100644
index 0000000..bacfea8
--- /dev/null
+++ b/Readme.md
@@ -0,0 +1,42 @@
+# Bamboo Lisp
+
+Embeddable & Hackable Lisp-2 Interpreter
+
+(Work in Progress)
+
+## Build
+
+Debug:
+
+```bash
+git submodule init --recursive
+make
+```
+
+Release:
+
+```bash
+git submodule init --recursive
+make profile=release
+```
+
+## Example
+
+```lisp
+(defun Y (f)
+ (funcall
+ (lambda (g) (funcall g g))
+ (lambda (h)
+ (funcall f (lambda args (apply (funcall h h) args))))))
+
+(defun fibo-impl (self)
+ (lambda (n)
+ (if (<= n 2)
+ 1
+ (+ (funcall self (- n 1)) (funcall self (- n 2))))))
+
+(defvar fibo (Y #'fibo-impl))
+
+(funcall fibo 10)
+```
+