Is there a way to dereference a list in lisp?
I am trying to compare 2 strings but one is in a list.
Is there a way to dereference a list in lisp?
I am trying to compare 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.