diff options
author | Arun Isaac | 2021-07-27 15:27:25 +0530 |
---|---|---|
committer | Arun Isaac | 2021-07-27 15:58:02 +0530 |
commit | c9c12e0e396475533ef987e3969b2ec847a8af9f (patch) | |
tree | 8c57fbd2682b3cf7c8b8820b51cb8e8a60f2911e /tests | |
parent | 7882038037b7b0911b63f3dd2a4413f5668c37da (diff) | |
download | ccwl-c9c12e0e396475533ef987e3969b2ec847a8af9f.tar.gz ccwl-c9c12e0e396475533ef987e3969b2ec847a8af9f.tar.lz ccwl-c9c12e0e396475533ef987e3969b2ec847a8af9f.zip |
ccwl: Make syntax-lambda** more like lambda**.
I have tripped up several times on the differences between lambda**
and syntax-lambda**. No longer! Making syntax-lambda** as close as
possible to lambda** makes the code much more readable and align
better with common sense.
* ccwl/utils.scm (syntax-lambda**): Do not ignore the first
identifier. Accept multiple values as arguments, not a single syntax
object.
* ccwl/ccwl.scm (command): Update use of syntax-lambda**.
* tests/utils.scm ("syntax-lambda**", "syntax-lambda** with default
values"): Update tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/utils.scm b/tests/utils.scm index bc9315d..be0e87f 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -84,13 +84,16 @@ (equal? (list #'1 #'2 #'123 (list #'1 #'2 #'3)) ((syntax-lambda** (a b #:key foo #:key* bar) (list a b foo bar)) - #'(foo 1 2 #:foo 123 #:bar 1 2 3)))) + #'1 #'2 #'#:foo #'123 #'#:bar #'1 #'2 #'3))) +((syntax-lambda** (a b #:key foo #:key* bar) + (list a b foo bar)) + #'1 #'2 #'#:foo #'123 #'#:bar #'1 #'2 #'3) (test-assert "syntax-lambda** with default values" (equal? (list #'1 #'2 #'123 9 #'(321 456) '(7) '(3 2 1)) ((syntax-lambda** (foo aal #:key vale (pal 9) #:key* naal (irandu 7) (sol 3 2 1)) (list foo aal vale pal naal irandu sol)) - #'(bar 1 2 #:vale 123 #:naal 321 456)))) + #'1 #'2 #'#:vale #'123 #'#:naal #'321 #'456))) (test-equal "filter-mapi" '(1 3 5 7 9) |