From 73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Jun 2022 21:09:35 +0200 Subject: Remove custom let*. While it was nice, the most important part was the multi-valued let from srfi-71 (which is implemented in srfi-71)). The minor pattern matching structures could often be replaced with car+cdr, or a propper match. --- tests/test/let.scm | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 tests/test/let.scm (limited to 'tests/test/let.scm') diff --git a/tests/test/let.scm b/tests/test/let.scm deleted file mode 100644 index 5312409e..00000000 --- a/tests/test/let.scm +++ /dev/null @@ -1,45 +0,0 @@ -;;; Commentary: -;; Tests my custom let*. -;;; Code: - -(define-module (test let) - :use-module (srfi srfi-64) - :use-module (srfi srfi-88) - :use-module ((hnh util) :select (let*))) - -(test-assert (let* ((a #t)) a)) - -(test-assert (let* (((a . b) (cons #t #f))) a)) - -(test-assert (let* (((a . b) (cons* #f #t))) b)) - -(test-assert - (let* ((a b c (values #f #t #f))) b)) - -(test-assert - (let* (((a b c) (list #f #t #f))) b)) - -(test-assert (let* (((a) '(#t))) a)) - -(test-equal '(2) (let* (((a . b) '(1 2))) b)) - -(test-equal - '(3 4) - (let* (((a b . c) '(1 2 3 4))) c)) - -(test-equal 10 (let* (x) (set! x 10) x)) - -(test-equal - 30 - (let* (x y) (set! x 10) (set! y 20) (+ x y))) - -(test-assert (let* (x) (not x))) - -(test-equal - 6 - (let* ((x 1) y z) - (set! y 2) - (set! z 3) - (+ x y z))) - - -- cgit v1.2.3