Skip to content

Instantly share code, notes, and snippets.

@ngsmrk
Last active August 29, 2015 14:15
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 ngsmrk/e0bf7a0cec044eb615a1 to your computer and use it in GitHub Desktop.
Save ngsmrk/e0bf7a0cec044eb615a1 to your computer and use it in GitHub Desktop.
Clojure -> Example of record defintion
(defrecord Team [name])
(defrecord Player [name team])
(def player-1 (Player. 'Joe (Team. 'Arsenal)))
(print (:name player-1))
(print (:name (:team player-1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment