Skip to content

Instantly share code, notes, and snippets.

@technomancy
Created January 21, 2009 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technomancy/50091 to your computer and use it in GitHub Desktop.
Save technomancy/50091 to your computer and use it in GitHub Desktop.
(defn take-thing [thing]
(dosync
(if (room-contains? @*current-room* thing)
(do (commute *inventory* conj (keyword thing))
(alter (:items @*current-room*)
(partial remove #(= % (keyword thing))))
(str "You picked up the " thing "."))
(str "There isn't any " thing " here."))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment