According to Symbol Type
A symbol whose name starts with a colon (‘:’) is called a keyword symbol. These symbols automatically act as constants, and are normally used only by comparing an unknown symbol with a few specific alternatives. See Constant Variables.
I understand they are constants, but I don't know to use them. For example, how to set its value(constants also have a value!), how to get its value, and when should I use them. I tried to use them as follows:
(defun test-func (:test-symbol)
(print :test-symbol))
(test-func "hello")
I got an error:
Attempt to set a constant symbol: :test-symbol
Could anyone give me an example?