fixed memq as sk does, and also fixing the test case expectations.

This commit is contained in:
Danny Yoo 2011-11-09 21:54:56 -05:00
parent 8962a9f79e
commit a405f49f29
5 changed files with 21 additions and 5 deletions

View File

@ -56,6 +56,7 @@
whalesong:cond
whalesong:case
whalesong:member
whalesong:memq
whalesong:define
whalesong:lambda
whalesong:unless
@ -425,6 +426,16 @@
[(eq? (member x L) #f) #f]
[else #t]))
(provide (rename-out [-member member]
[-member member?]))
;; as does memq
(define (-memq x L)
(cond
[(eq? (memq x L) #f) #f]
[else #t]))
(provide (rename-out [-member member]
[-member member?]
[-memq memq]))

View File

@ -1,2 +1,2 @@
Running tests...
All 10 tests passed!
All 11 tests passed!

View File

@ -6,6 +6,11 @@
(check-expect (make-g 1 2) (make-g 1 2))
(check-expect (make-g 'b empty) (make-g 'b empty))
(check-expect (cond
[(memq 'x (list 'a 'x 'b)) 1]
[else 2])
1)
(define i (open-image-url "http://racket-lang.org/logo.png"))
(check-expect (image-height i) 85)
(check-expect (image-width i) 88)

View File

@ -1,2 +1,2 @@
Running tests...
All 37 tests passed!
All 38 tests passed!

View File

@ -6,4 +6,4 @@
(provide version)
(: version String)
(define version "1.78")
(define version "1.82")