Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns lib)
- (use '[clojure.string :only (join split)])
- (defn get-smallest-spread [^String filename ]
- (let [lines (split (slurp filename) #"\n")]
- (doseq [line lines]
- (let [columns (split line #"\s{2}")]
- (println (- (Integer. (nth columns 4)) (Integer. (nth columns 3))))))))
- (get-smallest-spread "weather.dat")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement