In Common Lisp, is there a function that returns a symbol from a given string?
问题 I want >(??? "car") CAR >((??? "car") '(1 2)) 1 I can't seem to find a function that does this. 回答1: Are you looking for this? (eval (read-from-string "(car '(1 2))")) Gives: 1 UPDATE: How about (funcall (intern "CAR") '(1 2)) ? :) 回答2: There are a few, depending on exactly what you're wanting to do. First, intern, this will return an existing symbol by that name, if it exists and will otherwise create a new one. Second, find-symbol, this will return the symbol, if it exists and nil otherwise