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:cond
|
||||||
whalesong:case
|
whalesong:case
|
||||||
whalesong:member
|
whalesong:member
|
||||||
|
whalesong:memq
|
||||||
whalesong:define
|
whalesong:define
|
||||||
whalesong:lambda
|
whalesong:lambda
|
||||||
whalesong:unless
|
whalesong:unless
|
||||||
|
@ -425,6 +426,16 @@
|
||||||
[(eq? (member x L) #f) #f]
|
[(eq? (member x L) #f) #f]
|
||||||
[else #t]))
|
[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...
|
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 1 2) (make-g 1 2))
|
||||||
(check-expect (make-g 'b empty) (make-g 'b empty))
|
(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"))
|
(define i (open-image-url "http://racket-lang.org/logo.png"))
|
||||||
(check-expect (image-height i) 85)
|
(check-expect (image-height i) 85)
|
||||||
(check-expect (image-width i) 88)
|
(check-expect (image-width i) 88)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Running tests...
|
Running tests...
|
||||||
All 37 tests passed!
|
All 38 tests passed!
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
|
|
||||||
(provide version)
|
(provide version)
|
||||||
(: version String)
|
(: version String)
|
||||||
(define version "1.78")
|
(define version "1.82")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user