장민석
가입: 2006년 9월 5일 올린 글: 165
|
올려짐: 2007년5월21일 21:54 주제: 4-3 테스트 셋 |
|
|
코드: | ; test code
(myMatch '(1 0 0 1) (dot (star (dot (atom 1) (atom 0))) (atom 1)))
(myMatch '(1 0 1 1) (dot (star (dot (atom 1) (atom 0))) (atom 1)))
(myMatch '(1 0 1 0 1 0 1) (dot (star (dot (atom 1) (atom 0))) (atom 1)))
(myMatch '(1 0 0 1) (dot (dot (atom 1) (star (atom 0))) (atom 1)))
(myMatch '(1 0 0 0 1) (dot (dot (atom 1) (star (atom 0))) (atom 1)))
(myMatch '(1 0 0 1 0) (dot (dot (atom 1) (star (atom 0))) (atom 1)))
(myMatch '(1 9 4 9 4 1 0) (dot (bar (star (bar (dot (atom 9) (atom 4)) (atom 1))) (atom 7)) (atom 0)))
(myMatch '(9 4 1 9 4 1 7 0) (dot (bar (star (bar (dot (atom 9) (atom 4)) (atom 1))) (atom 7)) (atom 0)))
(myMatch '(7 0) (dot (bar (star (bar (dot (atom 9) (atom 4)) (atom 1))) (atom 7)) (atom 0)))
(myMatch '(1 7 0) (dot (bar (star (bar (dot (atom 9) (atom 4)) (atom 1))) (atom 7)) (atom 0)))
(myMatch '(1 1 7 1 9 4 7 0) (dot (bar (star (bar (dot (atom 9) (atom 4)) (atom 1))) (atom 7)) (atom 0)))
(myMatch '(1 2 3 1 3 3 2 1) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(1 3 3 1 3 3 2 2) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(3 1 1 1 3 1 2 1) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(2 2 1 2 3 2 2 2) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(3 3 3 3 3 3 3 3) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(1 2 3 1 3 3 2 2) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(1 2 4 1 3 3 2 1) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '(1 2 3 1 0 1 1 2) (star (bar (bar (atom 1) (atom 2)) (atom 3))))
(myMatch '() (star (atom 1)))
(myMatch '(1 2 3 1 0 1 1 2) (star (star (bar (bar (atom 1) (atom 2)) (atom 3)))))
(myMatch '(1 1 1) (star (star (star (star (atom 1))))))
(myMatch '(1 1 1) (star (star (star (star (dot (atom 1) (atom 0))))))) |
결과
코드: | #f
#f
#t
#t
#t
#f
#t
#f
#t
#f
#f
#t
#t
#t
#t
#t
#t
#f
#f
#t
#f
#t
#f |
혹시 잘못된 게 있는지 모르겠네요.. |
|