Skip to content

Commit ca60481

Browse files
committed
Add test for exercise 2-23
1 parent e111e8b commit ca60481

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

chapter2/exercise2-23.rkt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#lang racket
2+
(define (for-each proc items)
3+
(let ((a (map proc items)))
4+
(= 1 1)))
5+
6+
(module+ test
7+
(require rackunit)
8+
9+
(test-case "Test for for-each"
10+
;; 57
11+
;; 321
12+
;; 88
13+
(check-equal? (with-output-to-string (lambda () (for-each (lambda (x) (display x) (newline)) (list 57 321 88)))) "57\n321\n88\n")
14+
)
15+
)

chapter2/exercise2-23.scm

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)