Skip to content

Instantly share code, notes, and snippets.

Created July 14, 2014 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/a5bda24626de3a953ade to your computer and use it in GitHub Desktop.
Save anonymous/a5bda24626de3a953ade to your computer and use it in GitHub Desktop.
(defn main []
(let [tweets (rest (csv/parse-csv (slurp "tweets.csv")))
recent-tweets (map #(nth % 5) (take 10 tweets))]
(pprint/pprint recent-tweets)
(map println recent-tweets)))
@daGrevis
Copy link

Output:

 jk  lein run
("Storm is coming."
 "@waplet Viss slikti. :D"
 "@waplet Neesmu bijis, bet cenas šeit ir vājprātīgas. Pa 7€ īsti nepaēdu.:(("
 "Subway Latvia is overpriced!"
 "Popcorn time is so nicely done!"
 "American Gothic in the palette of Mona Lisa: Rearrange the pixels https://t.co/Ouyw2JssF1"
 "Neural networks in JavaScript https://t.co/XLySH6tZQG"
 "RT @m1sp: This answer about using the length of a hardcoded string to count has 147 upvotes. oh, Django http://t.co/ChlwrlnVE2"
 "πfs - the data-free filesystem! https://t.co/buyGPbQ2jc"
 "Vim giveaway. Oh, wait...")

@daGrevis
Copy link

Nevermind, I needed dorun because map is lazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment