about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-03-03 12:43:14 -0500
committerelioat <hi@eli.li>2023-03-03 12:43:14 -0500
commit1b103d03494d37144a3c39587d216a73511e2690 (patch)
tree149e89cb404c1107c1e4e4d7c824830f27e0e074 /lisp
parent7d63c21493390a5f327e89085df8799a902b9e3e (diff)
downloadtour-1b103d03494d37144a3c39587d216a73511e2690.tar.gz
*
Diffstat (limited to 'lisp')
-rw-r--r--lisp/js/README.md7
-rw-r--r--lisp/js/l.html32
2 files changed, 34 insertions, 5 deletions
diff --git a/lisp/js/README.md b/lisp/js/README.md
index 49b4c56..2f10a7e 100644
--- a/lisp/js/README.md
+++ b/lisp/js/README.md
@@ -30,4 +30,9 @@ To run in the browser:
 </html>
 ```
 
-`lisp.run()` is a convinence, it wraps `lisp.interpret(lisp.parse())`. 
\ No newline at end of file
+`lisp.run()` is a convinence, it wraps `lisp.interpret(lisp.parse())`. 
+
+See also: 
+
+- <https://github.com/hundredrabbits/Ronin>
+- <https://github.com/lctrt/nanolisp/>
\ No newline at end of file
diff --git a/lisp/js/l.html b/lisp/js/l.html
index 2699c4e..06c4357 100644
--- a/lisp/js/l.html
+++ b/lisp/js/l.html
@@ -8,10 +8,34 @@
 </head>
 <body>
 	<script>
-		const ret = lisp.run(
-			`(print 
-				(add 3 3))`
-			);
+		// note the surrounding parentheses!
+		// these are important and necessary (for now)
+		const a = `(
+
+		(print
+			(concat "banana " "oatmeal " "waffels"))
+
+		(def foo
+			(add 1 2))
+
+		(print foo)
+
+		(def bar
+			(add (add 3 3) 3))
+
+		(print bar)
+
+		(defn bird
+			(s t)
+			(concat s t))
+
+		(print 
+			(bird "tweet " "twoot"))
+
+
+		)`;
+
+		const ret = lisp.run(a);
 	</script>
 </body>
 </html>
\ No newline at end of file