6 ms·
Some 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")
by asimjalis 15y ago
Some 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