字符串列表上的lisp成员函数
问题描述:
我正在使用LISP并想知道如何在字符串列表中访问成员。我已经尝试了成员函数,但一直得到NIL。 感谢字符串列表上的lisp成员函数
(setq phrase-list '("What color is the sky?" "It is Blue.")) ;list of strings
(write phrase-list)
(terpri)
(setq x(read-line)) ; I try to input What color is the sky?
(write(member x phrase-list)) ; I keep getting NIL
答
+0
非常感谢你解决了我的问题。 –
为什么有关'lisp'标记的'scheme'的问题? –
您是否验证了绑定到'x'的字符串? –
对不起,我还应该删除common-lisp标签。我有点困惑。 –