1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

read-print: Add 'case' and 'cond' special forms.

* guix/read-print.scm (%special-forms): Add 'case' and 'cond'.
* tests/read-print.scm: Add tests.
This commit is contained in:
Ludovic Courtès
2022-08-08 11:49:44 +02:00
parent ff9522fb69
commit 6db3b34d72
2 changed files with 17 additions and 0 deletions

View File

@@ -141,6 +141,21 @@ expressions."
(let ((z (+ x y)))
(* z z)))")
(test-pretty-print "\
(case x
((1)
'one)
((2)
'two))")
(test-pretty-print "\
(cond
((zero? x)
'zero)
((odd? x)
'odd)
(else #f))")
(test-pretty-print "\
#~(string-append #$coreutils \"/bin/uname\")")