   (write-exemplar "set_mixed" "A ten element set with mixed values" (set vector-mixed))
   (write-exemplar "set_mixed" "Two sets nested inside an outter set"
     (set [(set vector-simple) (set vector-mixed)]))
-  
+
 
   (def map-simple {:a 1 :b 2 :c 3})
   (def map-mixed {:a 1 :b "a string" :c true})
   (def map-nested {:simple map-simple, :mixed map-mixed})
-  
+
   (write-exemplar "map_simple" "A simple map" map-simple)
   (write-exemplar "map_mixed" "A mixed map" map-mixed)
   (write-exemplar "map_nested" "A nested map" map-nested)

(ns exemplar
  (:require [transit.read :as r]
            [transit.write :as w]
            [clojure.java.io :as io]))

;; Generate a set of increasingly complex transit files.
;; Output checked into the transit repo under simple-examples.

(import [java.io File FileOutputStream ByteArrayInputStream ByteArrayOutputStream OutputStreamWriter])

(defn range-centered-on 
  ([n] (range-centered-on n 5))
  ([n m] (vec (range (- n m) (+ n m 1)))))
  
(defn vmap [f s]
  (vec (map f s)))


  (write-exemplar "map_string_keys" "A map with string keys" {"first" 1, "second" 2, "third" 3})

  (write-exemplar "map_numeric_keys" "A map with numeric keys" {1 "one", 2 "two"})

  (write-exemplar "map_vector_keys" "A map with vector keys" {[1 1] "one", [2 2] "two"})

  (write-exemplar "map_10_items" "10 item map"  (map-of-size 10))

  (doseq [i [10 90 91 92 93 94 95]]
    (write-exemplar
      (str "map_" i "_nested")
      (str "Map of two nested " i " item maps")
      {:f (map-of-size i) :s (map-of-size i)}))

  (write-exemplar
    "maps_two_char_sym_keys"
    "Vector of maps with identical two char symbol keys"
    [{:aa 1 :bb 2} {:aa 3 :bb 4} {:aa 5 :bb 6}])

  (write-exemplar
    "maps_three_char_sym_keys"
    "Vector of maps with identical three char symbol keys"
    [{:aaa 1 :bbb 2} {:aaa 3 :bbb 4} {:aaa 5 :bbb 6}])

  (write-exemplar
    "maps_four_char_sym_keys"
    "Vector of maps with identical four char symbol keys"
    [{:aaaa 1 :bbbb 2} {:aaaa 3 :bbbb 4} {:aaaa 5 :bbbb 6}])

  (write-exemplar
    "maps_two_char_string_keys"
    "Vector of maps with identical two char string keys"
    [{"aa" 1 "bb" 2} {"aa" 3 "bb" 4} {"aa" 5 "bb" 6}])

  (write-exemplar
    "maps_three_char_string_keys"
    "Vector of maps with identical three char string keys"
    [{"aaa" 1 "bbb" 2} {"aaa" 3 "bbb" 4} {"aaa" 5 "bbb" 6}])

  (write-exemplar
    "maps_four_char_string_keys"
    "Vector of maps with identical four char string keys"
    [{"aaaa" 1 "bbbb" 2} {"aaaa" 3 "bbbb" 4} {"aaaa" 5 "bbbb" 6}])
