;;Chapter 3, Test 7, Page 45 (deftest test-sequences () (check (= (length `(1 2 3)) 3) (= (car (subseq `(1 2 3 4 5) 2 3)) 3); pulls out just one element, but it is as a list, so we take the car. (equal (subseq `(1 2 3 4 5) 2 4) `(3 4)) ;pulls out the 2 and 3 indexed values, returns a list (equal (subseq (list 1 2 3 4 5) 3) (list 4 5)); pulls out the last element. B/c the third parameter was ommitted, it defaults to the length. (equal (reverse (list 1 2 3 4 5)) (list 5 4 3 2 1)); reverses the list (equal (sort (list 5 2 3 1 4 6) #'>) (list 6 5 4 3 2 1)) ;sorts the list largest->smallest (every #'numberp (list 1 2 3 4 5));makes sure that all elements are numbers (not (every #'numberp (list 1 2 3 4 `a)));checks to make sure that atleast one is not a number (some #'numberp (list 1 2 3 4 `a));checks to make sure that atleast one is a number. (every #'> (list 1 2 3 4) (list 0 1 2 3 4))));makes sure that all in first list are larger than all in second. the shortest list defines the # of tests.