about summary refs log tree commit diff stats
path: root/lisp/js/l.html
blob: 8927607d366db9b5dc8eff4bf8628cbccf70ef9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>lisp</title>
	<script src="lisp.js" type="text/javascript"></script>
</head>
<body>
	<script>
		// note the surrounding parentheses!
		// these are important and necessary (for now)
		const a = `(

		(print
			(concat "banana " "oatmeal " "waffels"))

		(def foo
			(+ 1 2))

		(print foo)

		(def bar
			(+ (+ 3 3) 3))

		(print bar)

		(fn bird
			(s t)
			(concat s t))

		(print 
			(bird "hello " "world"))

		)`;

		const ret = lisp.run(a);
	</script>
</body>
</html>