/ Published in: Scala
URL: http://stackoverflow.com/questions/4604237/how-to-write-to-a-file-in-scala
Expand |
Embed | Plain Text
} and it's used like this: import java.io._ val data = Array("Five","strings","in","a","file!") printToFile(new File("example.txt"))(p => { data.foreach(p.println) })
You need to login to post a comment.
