aboutsummaryrefslogtreecommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/Readme.md b/Readme.md
index bacfea8..a604193 100644
--- a/Readme.md
+++ b/Readme.md
@@ -22,6 +22,8 @@ make profile=release
## Example
+### 1. Y Combinator
+
```lisp
(defun Y (f)
(funcall
@@ -40,3 +42,19 @@ make profile=release
(funcall fibo 10)
```
+### 2. Macro
+
+```lisp
+(defmacro inc (x)
+ `(setq ,x (+ ,x 1)))
+
+(defmacro for (start pred inc . body)
+ `(let (,start)
+ (while ,pred
+ ,@body
+ ,inc)))
+
+(for (i 0) (< i 10) (inc i)
+ (show "meow"))
+```
+