Common Lisp Programmatic Keyword

后端 未结 6 1076
我在风中等你
我在风中等你 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条回答
  •  抹茶落季
    2020-12-14 07:39

    Here's a make-keyword function which packages up keyword creation process (interning of a name into the KEYWORD package). :-)

    (defun make-keyword (name) (values (intern name "KEYWORD")))
    

提交回复
热议问题