summaryrefslogtreecommitdiffstats
path: root/tests/012/quasi.tl
blob: 1c4092e24dbc7ea0941459b04b8bf5c2e9f7c44e (plain)
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
(load "../common")

(test
  (mapcar (ap (op (ret `@@@1-@@@rest`))) '((a b) (c d) (e f)))
  ("a-b" "c-d" "e-f"))

(test
  (let ((a "abc") (b 123))
    `@{b 12} @{b -12} @{a [0] 3} @{a [0..2] -5}`)
  "123                   123 a      ab")

(test
  (let ((a "abc") (b 123))
    [(ret `@1-@2-@@1-@@2-@{@1 -4}-@{@2 -4}`) a b])
  "abc-123-abc-123- abc- 123")

(test
  [(ret `@1-@rest`) 1 2 3 4]
  "1-2 3 4")

(test
  [(ret `@1-@@rest`) 1 2 3 4]
  "1-2 3 4")

(test
  [(ret [(ret `@1 @rest @@1 @@rest @@@rest @@@1`) 1 10]) 2 20]
  "1 10 1 10 20 2")