;;;; assignment specification file ;;; specify the numbers for the problem files to be loaded (defparameter *prob-files* '(1 2 3 4 5 6 7)) ;;; specify list of functions to test (defparameter *functions* '(my-find-cond my-find-do double-mapcar double-dolist double-do double-recursive exify count-anywhere dot-product x-product k-product)) ;;; define a set of argument/expected outcome pairs, for functions with multiple args, ;;; put args into a list. There is a list for every function in 'functions' (defparameter *inputs* '( ;;; my-find-cond (((b (a b c d)) b) ((b (a b c a b c)) b) (((a b) (a b (a a) (a b))) (a b)) ((a (b c d)) nil) ((nil (b nil a)) nil)) ;;; my-find-do (((b (a b c d)) b) ((b (a b c a b c)) b) (((a b) (a b (a a) (a b))) (a b)) ((a (b c d)) nil) ((nil (b nil a)) nil)) ;;; double-mapcar ((((3 22 5.2 34)) (6 44 10.4 68)) (((1 -2 3 4)) (2 -4 6 8)) (((1)) (2)) ((()) ()) (((0.5 1 1.5)) (1.0 2 3.0))) ;;; double-dolist ((((3 22 5.2 34)) (6 44 10.4 68)) (((1 -2 3 4)) (2 -4 6 8)) (((1)) (2)) ((()) ()) (((0.5 1 1.5)) (1.0 2 3.0))) ;;; double-do ((((3 22 5.2 34)) (6 44 10.4 68)) (((1 -2 3 4)) (2 -4 6 8)) (((1)) (2)) ((()) ()) (((0.5 1 1.5)) (1.0 2 3.0))) ;;; double-recursive ((((3 22 5.2 34)) (6 44 10.4 68)) (((1 -2 3 4)) (2 -4 6 8)) (((1)) (2)) ((()) ()) (((0.5 1 1.5)) (1.0 2 3.0))) ;;; exify ((((1 hello 3 foo 0 nil bar)) (X X X X X NIL X)) (((1 (hello (3 nil (foo)) 0 (nil)) (((bar))))) (X (X (X NIL (X)) X (NIL)) (((X))))) (((nil nil nil nil)) (nil nil nil nil)) (((1 (2 (3) 4) 5)) (X (X (X) X) X)) ((()) ())) ;;; count-anywhere (((a (a (b (a) (c a)) a)) 4) ((nil (nil () ((a nil) ()) (a b) nil)) 5)) ;;; dot-product ((((10 20) (3 4)) 110) (((1 2 4 5) (3 4 3 4)) 43) (((5) (2)) 10)) ;;; x-product (((+ (1 2 3) (10 20 30)) (11 12 13 21 22 23 31 32 33)) ((* (1 2 3) (10 20 30)) (10 20 30 20 40 60 30 60 90)) ((list (1 2 3) (a b c)) ((1 a) (2 a) (3 a) (1 b) (2 b) (3 b) (1 c) (2 c) (3 c)))) ;;; k-product (((((a b c) (1 2 3))) ((a 1) (a 2) (a 3) (b 1) (b 2) (b 3) (c 1) (c 2) (c 3))) ((((a b) (1 2 3) (x y))) ((a 1 x) (a 1 y) (a 2 x) (a 2 y) (a 3 x) (a 3 y) (b 1 x) (b 1 y) (b 2 x) (b 2 y) (b 3 x) (b 3 y)))) ) )