@@ -1442,14 +1442,14 @@ Using numbers directly will use less variables and more efficient code."
1442
1442
(loopy-deftest iter-single-var-with-bound
1443
1443
:doc "When single var is `with'-bound, `iter' must be indirect."
1444
1444
:result '(27 1 1 2 2 3)
1445
- :body (loopy (with (iter-maker (iter-lambda ()
1446
- (iter-yield 1)
1447
- (iter-yield 2)
1448
- (iter-yield 3)))
1449
- (i 27))
1450
- (collect i)
1451
- (iter i (funcall iter-maker))
1452
- (collect i))
1445
+ :body ((with (iter-maker (iter-lambda ()
1446
+ (iter-yield 1)
1447
+ (iter-yield 2)
1448
+ (iter-yield 3)))
1449
+ (i 27))
1450
+ (collect i)
1451
+ (iter i (funcall iter-maker))
1452
+ (collect i))
1453
1453
:loopy t
1454
1454
:iter-keyword (iter collect)
1455
1455
:iter-bare ((iter . iterating)
@@ -1564,9 +1564,9 @@ Using numbers directly will use less variables and more efficient code."
1564
1564
(loopy-deftest list-destructuring
1565
1565
:doc "Check that `list' implements destructuring, not destructuring itself."
1566
1566
:result '(5 6)
1567
- :body (loopy (list (a . b)
1568
- '((1 . 2) (3 . 4) (5 . 6)))
1569
- (finally-return a b))
1567
+ :body ((list (a . b)
1568
+ '((1 . 2) (3 . 4) (5 . 6)))
1569
+ (finally-return a b))
1570
1570
:loopy t
1571
1571
:iter-keyword (list)
1572
1572
:iter-bare ((list . listing)))
@@ -1692,9 +1692,9 @@ Using numbers directly will use less variables and more efficient code."
1692
1692
(loopy-deftest map-vector
1693
1693
:result '((0 . a) (1 . b) (2 . c) (3 . d))
1694
1694
:repeat _map
1695
- :body (loopy (_map pair [a b c d])
1696
- (collect coll pair)
1697
- (finally-return coll))
1695
+ :body ((_map pair [a b c d])
1696
+ (collect coll pair)
1697
+ (finally-return coll))
1698
1698
:loopy ((_map . (map map-pairs)))
1699
1699
:iter-keyword ((_map . (map map-pairs))
1700
1700
(collect . collect))
@@ -1803,10 +1803,10 @@ Using numbers directly will use less variables and more efficient code."
1803
1803
(loopy-deftest map-ref-:unique-nil
1804
1804
:doc "Fist `:a' becomes 15 because it gets found twice by `setf'."
1805
1805
:result '(:a 15 :a 2 :b 10)
1806
- :body (loopy (with (map (list :a 1 :a 2 :b 3)))
1807
- (map-ref i map :unique nil)
1808
- (do (cl-incf i 7))
1809
- (finally-return map))
1806
+ :body ((with (map (list :a 1 :a 2 :b 3)))
1807
+ (map-ref i map :unique nil)
1808
+ (do (cl-incf i 7))
1809
+ (finally-return map))
1810
1810
:loopy t
1811
1811
:iter-keyword (map-ref do collect)
1812
1812
:iter-bare ((map-ref . mapping-ref)
@@ -2265,12 +2265,12 @@ Using numbers directly will use less variables and more efficient code."
2265
2265
3))
2266
2266
(collect i))
2267
2267
2268
- (loopy (with (times 0))
2269
- (sequence i (vector 2 1 0) :above (progn
2270
- (cl-assert (= times 0))
2271
- (cl-incf times)
2272
- -1))
2273
- (collect i))]
2268
+ ((with (times 0))
2269
+ (sequence i (vector 2 1 0) :above (progn
2270
+ (cl-assert (= times 0))
2271
+ (cl-incf times)
2272
+ -1))
2273
+ (collect i))]
2274
2274
:loopy t
2275
2275
:iter-keyword (sequence collect)
2276
2276
:iter-bare ((sequence . sequencing)
@@ -2625,9 +2625,9 @@ Using numbers directly will use less variables and more efficient code."
2625
2625
(loopy-deftest seq-index-init-no-with
2626
2626
:doc "`seq-index' can default to the starting index if not with-bound."
2627
2627
:result '(0 0 1 1 2 2 3 3)
2628
- :body (loopy (collect i)
2629
- (seq-index i [1 2 3 4])
2630
- (collect i))
2628
+ :body ((collect i)
2629
+ (seq-index i [1 2 3 4])
2630
+ (collect i))
2631
2631
:loopy t
2632
2632
:iter-keyword (seq-index collect)
2633
2633
:iter-bare ((seq-index . sequencing-index)
@@ -4430,11 +4430,11 @@ Using `start' and `end' in either order should give the same result."
4430
4430
(loopy-deftest nunion-end-tracking-:at-start-twice
4431
4431
:result '(10 8 9 7 5 6 4 1 2 3)
4432
4432
:multi-body t
4433
- :body [(loopy (array i (vector (list 1 2 3) (list 1 2 3)
4434
- (list 4 5 6) (list 7 8 9)))
4435
- (nunion coll (copy-sequence i) :at start)
4436
- (nunion coll (mapcar #'1+ i) :at start)
4437
- (finally-return coll))
4433
+ :body [((array i (vector (list 1 2 3) (list 1 2 3)
4434
+ (list 4 5 6) (list 7 8 9)))
4435
+ (nunion coll (copy-sequence i) :at start)
4436
+ (nunion coll (mapcar #'1+ i) :at start)
4437
+ (finally-return coll))
4438
4438
4439
4439
((array i (vector (list 1 2 3) (list 1 2 3)
4440
4440
(list 4 5 6) (list 7 8 9)))
@@ -4447,12 +4447,12 @@ Using `start' and `end' in either order should give the same result."
4447
4447
4448
4448
(loopy-deftest nunion-end-tracking-accum-opt-start-:at-end
4449
4449
:result '(1 2 3 4 5 6 7 8 9 10)
4450
- :body (loopy (accum-opt (coll start))
4451
- (array i (vector (list 1 2 3) (list 1 2 3)
4452
- (list 4 5 6) (list 7 8 9)))
4453
- (nunion coll (copy-sequence i) :at end)
4454
- (nunion coll (mapcar #'1+ i) :at end)
4455
- (finally-return coll))
4450
+ :body ((accum-opt (coll start))
4451
+ (array i (vector (list 1 2 3) (list 1 2 3)
4452
+ (list 4 5 6) (list 7 8 9)))
4453
+ (nunion coll (copy-sequence i) :at end)
4454
+ (nunion coll (mapcar #'1+ i) :at end)
4455
+ (finally-return coll))
4456
4456
:loopy t
4457
4457
:iter-keyword (array nunion)
4458
4458
:iter-bare ((array . arraying)
@@ -4461,12 +4461,12 @@ Using `start' and `end' in either order should give the same result."
4461
4461
;; TODO: Fail. Fix in optimized constructor, same as others.
4462
4462
(loopy-deftest nunion-end-tracking-accum-opt-end-:at-start
4463
4463
:result '(10 8 9 7 5 6 4 1 2 3)
4464
- :body (loopy (accum-opt (coll end))
4465
- (array i (vector (list 1 2 3) (list 1 2 3)
4466
- (list 4 5 6) (list 7 8 9)))
4467
- (nunion coll (copy-sequence i) :at start)
4468
- (nunion coll (mapcar #'1+ i) :at start)
4469
- (finally-return coll))
4464
+ :body ((accum-opt (coll end))
4465
+ (array i (vector (list 1 2 3) (list 1 2 3)
4466
+ (list 4 5 6) (list 7 8 9)))
4467
+ (nunion coll (copy-sequence i) :at start)
4468
+ (nunion coll (mapcar #'1+ i) :at start)
4469
+ (finally-return coll))
4470
4470
:loopy t
4471
4471
:iter-keyword (array nunion)
4472
4472
:iter-bare ((array . arraying)
@@ -4799,13 +4799,13 @@ This is how `cl-reduce' and `seq-reduce' work."
4799
4799
(loopy-deftest union-:key
4800
4800
:result '((a . 1))
4801
4801
:multi-body t
4802
- :body [(loopy (array i [((a . 1)) ((a . 2))])
4803
- (union var i :key #'car)
4804
- (finally-return var))
4802
+ :body [((array i [((a . 1)) ((a . 2))])
4803
+ (union var i :key #'car)
4804
+ (finally-return var))
4805
4805
4806
- (loopy (with (func #'car))
4807
- (array i [((a . 1)) ((a . 2))])
4808
- (union i :key func))]
4806
+ ((with (func #'car))
4807
+ (array i [((a . 1)) ((a . 2))])
4808
+ (union i :key func))]
4809
4809
:loopy t
4810
4810
:iter-keyword (union array)
4811
4811
:iter-bare ((union . unioning)
@@ -4900,10 +4900,10 @@ This is how `cl-reduce' and `seq-reduce' work."
4900
4900
(union coll (mapcar (lambda (x) (+ x 10)) i) :at end)
4901
4901
(finally-return coll))
4902
4902
4903
- (loopy (list i '((1 2 3 4) (8 7 6 5)))
4904
- (union coll (mapcar (lambda (x) (+ x 10)) i) :at end)
4905
- (union coll i :at start)
4906
- (finally-return coll))
4903
+ ((list i '((1 2 3 4) (8 7 6 5)))
4904
+ (union coll (mapcar (lambda (x) (+ x 10)) i) :at end)
4905
+ (union coll i :at start)
4906
+ (finally-return coll))
4907
4907
4908
4908
((list i '((1 2 3 4) (8 7 6 5)))
4909
4909
(union i :at start)
@@ -5382,9 +5382,9 @@ Not multiple of 3: 7"
5382
5382
5383
5383
(loopy-deftest always-multiple-commands
5384
5384
:result t
5385
- :body (loopy (list i '(1 3 5 7))
5386
- (always (cl-oddp i))
5387
- (always (< i 10)))
5385
+ :body ((list i '(1 3 5 7))
5386
+ (always (cl-oddp i))
5387
+ (always (< i 10)))
5388
5388
:loopy t
5389
5389
:iter-keyword (list always)
5390
5390
:iter-bare ((list . listing)
@@ -5430,9 +5430,9 @@ Not multiple of 3: 7"
5430
5430
5431
5431
(loopy-deftest multiple-never
5432
5432
:result t
5433
- :body (loopy (list i '(1 3 5 7))
5434
- (never (cl-evenp i))
5435
- (never (> i 10)))
5433
+ :body ((list i '(1 3 5 7))
5434
+ (never (cl-evenp i))
5435
+ (never (> i 10)))
5436
5436
:loopy t
5437
5437
:iter-keyword (list never)
5438
5438
:iter-bare ((list . listing)
0 commit comments