2

I came across this example:

(setq h-data '((:num 1 :key "apple")
               (:num 9 :key "berry")
               (:num 2 :key "cactus")
               (:num 5 :key "dog")
               (:num 4 :key "frog")))

The source said that this is a property list. So, I looked up the manual and did not notice any syntax using a colon. What is this syntax? Is :num different from 'num? Where is this syntax described in the manual?

Drew
  • 75,699
  • 9
  • 109
  • 225
AlwaysLearning
  • 749
  • 4
  • 14

1 Answers1

3

See 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.

choroba
  • 1,925
  • 10
  • 16