title: How do I use \*print-dup\* to print records in clojure? A simple case
body: <p>I'm trying to use *print-dup* to allow writing clojure data to a file 
  and then read it back, however, I'm getting problems even with this 
  simple case. Is there something I am doing wrong? What do I need to do 
  to get this to work?</p>
  
  <pre><code>Clojure 1.3.0-alpha3-SNAPSHOT 
  user=&gt; (defrecord TreeNode [val left right]) ;;create the record 
  user.TreeNode 
  user=&gt; (TreeNode. 5 nil nil) 
  #:user.TreeNode{:val 5, :left nil, :right nil} ;; it works just fine 
  user=&gt; (binding [*print-dup* true] (prn (TreeNode. 5 nil nil))) ;; use *print-dup* to support reading in and preserving type 
  #=(user.TreeNode/create {:val #=(java.lang.Long. "5"), :left nil, :right nil}) ;; this is the form we need to copy paste 
  nil 
  user=&gt; #=(user.TreeNode/create {:val #=(java.lang.Long. "5"), :left nil, :right nil}) ;;trying to copy and paste 
  IllegalArgumentException No matching method found: create 
  clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:50) ;;we have an error 
  user=&gt;
  </code></pre>