Created
January 17, 2012 13:56
-
-
Save stuarthalloway/1626694 to your computer and use it in GitHub Desktop.
seqs are not mutable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment