开发者

Is there a way to dereference a list in common lisp?

Is there a way to dereference a list in lisp?

I am trying to comp开发者_Go百科are 2 strings but one is in a list.


It sounds like you want car. If your second structure looks like '("string"), then you want

(car '("string"))

If the string is not the first element in the list, you probably want (for example)

(nth 2 '(1 symbol "string"))

Remember to compare strings you want equal, not = which is for numbers only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜