Skip to content

Instantly share code, notes, and snippets.

@ngsmrk
Last active August 29, 2015 14:15
Show Gist options
  • 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