reading file to list

William James w_a_x_man at yahoo.com
Sun Feb 22 03:13:11 EST 2009


André Thieme wrote:

> (map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s")) (line-seq
> (reader "blob.txt")))

An error results:

java.lang.Exception: Unable to resolve symbol: reader in this context

This works:

(map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s"))
  (.split (slurp "junk") "\r?\n"))



More information about the Python-list mailing list