Common Lisp Programmatic Keyword

后端 未结 6 1087
我在风中等你
我在风中等你 2020-12-14 07:10

Is there a function in Common Lisp that takes a string as an argument and returns a keyword?

Example: (keyword \"foo\") -> :foo

6条回答
  •  Happy的楠姐
    2020-12-14 07:38

    (intern "foo" "KEYWORD") -> :foo
    

    See the Strings section of the Common Lisp Cookbook for other string/symbol conversions and a detailed discussion of symbols and packages.

提交回复
热议问题