我正在阅读Peter Norvig 编写的人工智能编程范例(PAIP),我正在尝试用Clojure编写所有代码,而不是使用常见的Lisp编写代码.但是我仍然坚持第39页的这段代码:
(defparameter *simple-grammar*
'((sentence -> (noun-phrase verb-phrase))
(noun-phrase -> (Article Noun))
(verb-phrase -> (Verb noun-phrase))
(Article -> the a)
(Noun -> man ball woman table)
(Verb -> hit took saw liked))
"A grammar for a trivial subset of English.")
(defvar *grammar* *simple-grammar*)
Run Code Online (Sandbox Code Playgroud)
我怎样才能把它翻译成Clojure?谢谢.