3 ms·
10 Clojure One Liners
- asimjalis 15y agoSome of the examples need the require statement to work correctly. E.g. example 4 should be (require 'clojure.contrib.io) (def file-text (slurp "data.txt")) ; Reads the whole file (def file-lines (clojure.contrib.io/read-lines "data.txt")) ; Reads as a sequence of lines