Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
lispでリストを逆参照する方法はありますか?
2つの文字列を比較しようとしていますが、1つはリストにあります。
あなたが望むように聞こえますcar。'("string")2番目の構造がのように見える場合は、
car
'("string")
(car '("string"))
文字列がリストの最初の要素でない場合は、おそらく次のようにします(たとえば)
(nth 2 '(1 symbol "string"))
数字だけではequalなく、必要な文字列を比較することを忘れないでください。=
equal
=