Commits

Miki Tebeka committed e710b0d

Writing docs

  • Participants
  • Parent commits 1b43d6a

Comments (0)

Files changed (1)

     
     ;=> #<Date Sun Feb 20 07:58:00 PST 2011>
 
+Writing
+-------
+
+::
+
+    ; Simple usage
+    (write-csv [[1 2 3] [4 5 6]] "points.csv")
+
+    ; With headers
+    (write-csv [[1 2 3] [4 5 6] "points.csv" :headers ["x" "y" "z"])
+
+    ; Write maps, first map will be used as headers information
+    (write-csv [{"x" 1 "y" 2 "z" 3} {"x" 4 "y" 5 "z" 6}] "points.csv")
+
+    ; Use a formatter
+    (def format { "x" : #(str (* % 2)) })
+    (write-csv [{"x" 1 "y" 2 "z" 3} {"x" 4 "y" 5 "z" 6}] "points.csv"
+                :format format)
+
+    ; Use a different delimiter
+    (write-csv [[1 2 3] [4 5 6]] "points.csv" :delimiter \|)
 
 License
 =======