-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathquotation.sst
82 lines (49 loc) · 1.27 KB
/
quotation.sst
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
'#t => #t
'#f => #f
'0 => 0
'0.0 => 0.0
'#\a => #\a
'"" => ""
'"abc" => "abc"
'() => #null
'#null => #null
'(1) => (cons 1 #null)
'(1 . 2) => (cons 1 2)
'#u8() => #u8()
'#u8(0 1 2 127 128 253 254 255) => #u8(0 1 2 127 128 253 254 255)
'#() => #()
'#(#null #t #f 0 0.0 #\a a "abc" () #u8() #()) => #(#null #t #f 0 0.0 #\a a "abc" () #u8() #())
'#t => #t
''#t => '(quote #t)
'('#t) => '((quote #t))
'() => '()
''() => '(quote ())
'('()) => '((quote ()))
`#t => #t
``#t => '(quasiquote #t)
`(`#t) => '((quasiquote #t))
`() => '()
``() => '(quasiquote ())
`(`()) => '((quasiquote ()))
`,'() => '()
`'`() => '(quote (quasiquote ()))
`(,@'()) => '()
`(,@`()) => '()
`,#t => #t
``#t => '(quasiquote #t)
`(`#t) => '((quasiquote #t))
`,#t => #t
`,`#t => #t
`(,@`#t) => #t
`(,@#t) => #t
`((1 ,@'(3) 2)) => '((1 3 2))
`((1 ,@'(3) 2)) => (list (append (list 1) (list 3) (list 2)))
`((1 ,@'(3 4) 2)) => '((1 3 4 2))
`((1 ,@'(3 4) 2)) => (list (append (list 1) (list 3 4) (list 2)))
`((1 (x) 2)) => '((1 (x) 2))
`((1 (,(+ 0 3)) 2)) => (list (list 1 (list (+ 0 3)) 2))
``,1 => '(quasiquote (unquote 1))
``,,1 => '(quasiquote (unquote 1))
``(,,1) => '(quasiquote ((unquote 1)))
`(`(,(,1))) => '((quasiquote ((unquote (1)))))
`(1 ```,,@,,@(list (+ 1 2)) 4) => !fixme '(1 ```,,@,3 4)