Skip to content

Instantly share code, notes, and snippets.

@kumarshantanu
Created August 25, 2010 22:22
Show Gist options
  • Save kumarshantanu/550420 to your computer and use it in GitHub Desktop.
Save kumarshantanu/550420 to your computer and use it in GitHub Desktop.
(defn ppe ;; pretty-print-entities
([e]
(print-entities e))
([label e]
(println label)
(print-entities e)))
(let [e1 (BlogEntry. {}
{:title "Test"
:content "Hello World"
:whenposted (new java.util.Date)} )
e2 (BlogEntry. {}
{:title "Second post"
:content "Amarnath Trip"
:whenposted (new java.util.Date)} )]
(ppe "Entity 1:" e1)
(ppe "Entity 2:" e2)
(ppe "Entities 1 and 2:" [e1 e2]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment