This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defrecord E []) | |
(extend-protocol IPrintWithWriter E (-pr-writer [this writer _] (write-all writer "#e" (into {} this)))) | |
(def e (map->E {})) | |
(print e) ; prints #e{} | |
(pprint e) ; prints {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def composite-data | |
{:composite/item {:id 0 | |
:width 400 | |
:height 400 | |
:color "#428BCA" | |
:counter {:id 0 | |
:init 0} | |
:children [{:id 1 | |
:width 200 | |
:height 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ============================================================================= | |
;; Composite | |
(def composite-data | |
{:composite/item {:id 0 | |
:width 400 | |
:height 400 | |
:color "#428BCA" | |
:children [{:id 1 | |
:width 200 |