Can I use assoc when the keys are strings?

Viewed 1171

I have a data set like this: '(("red" 3 5)("blue" 6 8)...)

Is it possible to use assoc when the keys are strings? None of the obvious attempts have worked for me in this simple test:

CL-USER> (defparameter ggg (list '("foot" 2) '(bar 5)))
GGG
CL-USER> ggg
(("foot" 2) (BAR 5))
CL-USER> (assoc 'bar ggg)
(BAR 5)
CL-USER> (assoc "foot" ggg)
NIL
CL-USER> (assoc '"foot" ggg)
NIL
CL-USER> (assoc 'foot ggg)
NIL
4 Answers
Related