Why does http://www.lisperati.com/clojure-spels/data.html use quoted symbols, instead of keywords?
(def objects '(whiskey-bottle bucket frog chain))
(def game-map (hash-map
'living-room '((you are in the living room
of a wizards house - there is a wizard
snoring loudly on the couch -)
(west door garden)
(upstairs stairway attic))
'garden '((you are in a beautiful garden -
there is a well in front of you -)
(east door living-room))
'attic '((you are in the attic of the
wizards house - there is a giant
welding torch in the corner -)
(downstairs stairway living-room))))
(def object-locations (hash-map
'whiskey-bottle 'living-room
'bucket 'living-room
'chain 'garden
'frog 'garden))
(def location 'living-room)
(defn describe-location [location game-map]
(first (location game-map)))
I changed 'living-room to :living-room in all places and it worked.
I'm very new to Clojure - what is the point of 'something, when :something is available to be used?
(I understand what quote does - I would like to know when to use a quoted symbol instead of a keyword.)
'somethingis a symbol whereas:somethingis a keyword. The classical lisp doesn't have concept of keywords. Your question title should be about symbol vs keyword, not quote vs symbol as quote is a way to create symbol - Ankur