Guest User

Untitled

a guest
Apr 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. npowell@malaise:~$ cat test.txt
  2. hai
  3. hai
  4. hai
  5. hai
  6. hai
  7. hai
  8. hai
  9. hai
  10. hai
  11. hai
  12. hai
  13.  
  14. ==
  15.  
  16. (ns test
  17. (:use [clojure.contrib.duck-streams :only [reader]]))
  18.  
  19. (def foo (line-seq (reader "test.txt")))
  20.  
  21. (println (map #(str %1 " werld!") foo))
  22.  
  23.  
  24. ==
  25.  
  26. npowell@malaise:~$ clojure test.clj
  27. (hai werld! hai werld! hai werld! hai werld! hai werld! hai werld! hai werld! hai werld! hai werld! hai werld! hai werld!)
Add Comment
Please, Sign In to add comment