开发者

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

开发者 https://www.devze.com 2023-01-16 03:50 出处:网络
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

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

精彩评论

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

关注公众号