about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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