public
Created

seqs are not mutable

  • Download Gist
gistfile1.clj
Clojure
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(require '[clojure.string :as str])
 
(def data "Bob,Dobbs,bob@dobbs.com,25.00
Rocket J.,Squirrel,rocky@frostbite.com,0.00
Bullwinkle,Moose,bull@frostbite.com,0.25
Vim,Wibner,vim32@goomail.com,25.00")
 
(def lines (str/split data #"\n"))
 
(def registrants (map #(zipmap [:first :last :email :payment]
(str/split % #",")) lines))
 
(doseq [r registrants] (println r))
(doseq [r registrants] (println r))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.