secret
Created

transient-map-bug.clj

  • Download Gist
gistfile1.clj
Clojure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
(println *clojure-version*)
 
(let [map (transient {})]
(doto map
;; (assoc! "accept" "*/*")
;; (assoc! "host" "www.debian.org")
(assoc! "date" "Tue, 31 Jan 2012 05:48:17 GMT")
(assoc! "server" "Apache")
(assoc! "content-location" "index.en.html")
(assoc! "vary" "negotiate,accept-language,Accept-Encoding")
(assoc! "tcn" "choice")
(assoc! "last-modified" "Tue, 31 Jan 2012 03:39:36 GMT")
(assoc! "etag" "3885-4b7cab6438e00")
(assoc! "accept-ranges" "bytes")
(assoc! "content-length" "14469"))
 
(println "content-length: " (map "content-length"))
 
(let [map (persistent! map)]
(println "GOT: " map)))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.