Guest User

Untitled

a guest
Jan 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import scala.io.Source
  2.  
  3. if(args.length > 0) {
  4. val lines = Source.fromFile(args(0)).getLines().toList
  5. val max lines.map(line <= line.length).max
  6. println(max)
  7. for(line <- lines) {
  8. println(line.length + " " + line)
  9. }
  10. } else {
  11. println("Please enter a filename")
  12. }
Add Comment
Please, Sign In to add comment