Open g0dzill3r opened 1 year ago
Working except for the dotted pair situation.
repl> (define x 12345)
repl> `(a b ,(list 'c x) ,@(list x x x))
=> (a b (c 12345) 12345 12345 12345)
repl> `(a b ,(list 'c x) ,@(list x x x) ,@'(1 2 3 4))
=> (a b (c 12345) 12345 12345 12345 1 2 3 4)
Support for dotted pair splicing is in place:
repl> `(1 2 3 ,(+ 3 1) ,@(list 5))
=> (1 2 3 4 5)
repl> `(1 2 3 ,(+ 3 1) ,@5)
=> (1 2 3 4 . 5)
repl> `(1 2 3 ,(+ 3 1) ,@5 6 7)
java.lang.IllegalStateException: Illegal dotted pair in non-trailing position: 5
Escaping of escaping is not working properly. These should produce this output:
> `(1 `,(+ 1 ,(+ 2 3)) 4)
=> '(1 `,(+ 1 5) 4)
and
> `(1 ```,,@,,@(list (+ 1 2)) 4)
=> '(1 ```,,@,3 4)