fixed memq as sk does, and also fixing the test case expectations.
This commit is contained in:
parent
8962a9f79e
commit
a405f49f29
|
@ -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]))
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Running tests...
|
||||
All 10 tests passed!
|
||||
All 11 tests passed!
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Running tests...
|
||||
All 37 tests passed!
|
||||
All 38 tests passed!
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
|
||||
(provide version)
|
||||
(: version String)
|
||||
(define version "1.78")
|
||||
(define version "1.82")
|
||||
|
|
Loading…
Reference in New Issue
Block a user