我有选项功能中创建的菜单,其功能是让用户输入一个数字(1或2或3),以解决所选方法(DFS,BFS,BESTFS)的问题.该方法应该返回用户在这行代码中选择的内容(SearchProblem'(0 0 2 6 4)'(0 0 0 0 0)(选项)).问题是,当我编译问题时,它显示此错误"In = of(NIL 1)参数应该是NUMBER类型.".我该如何解决这个问题?
;----------Otptions menu------------------------------------------------------
(defun Options ()
( print "Searching methods." )
( print "For DFS method press 1." )
( print "For BFS method press 2." )
( print "For BESTFS method press 3." )
( print "Choose searching method" )
( let (opt (read))
(cond
( ( = opt 1 ) 'DFS )
( ( = opt 2 ) 'BFS )
( ( = opt 3 ) 'BESTFS …Run Code Online (Sandbox Code Playgroud) common-lisp ×1