3
如何接受以下輸入?方案中的模式匹配
(list of 0 or more charcters and ends with 3) or
(list of 1 or more characters 4 and 0 or more characters after 4)
像
(match (list 3)) -> #t
(match (list 1 2 3)) -> #t
(match (list 1 2 3 4)) -> #t
(match (list 1 2 3 4 5)) -> #t
(match (list 4)) -> #f
編輯:這不是我的功課。我試圖從PAIP寫ELIZA之類的東西,但我只知道如何編寫一個以單詞開始的模式。