Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (checkType . x)
- (cond
- [(vector? x) (display "x is a vector")]
- [(list? x) (display "x is a list")]
- [#t (newline)]
- ))
- > (checkType (make-vector 3 #(1 2 3)))
- x is a list
- > (checkType (make-vector 3 #(1 2 3)))
- x is a list
- > (vector? (make-vector 3 #(1 2 3)))
- #t
- > (list? (make-vector 3 #(1 2 3)))
- #f
Add Comment
Please, Sign In to add comment