Align columns: Difference between revisions

Content added Content deleted
Line 1,309: Line 1,309:
val lines = scala.io.Source.fromFile("c:\\text.txt").getLines.map(_.trim())
val lines = scala.io.Source.fromFile("c:\\text.txt").getLines.map(_.trim())
val words = lines.map(_.split("\\$").toList).toList
val words = lines.map(_.split("\\$").toList).toList
val lens = words.map(l => l.map(s=>s.length)).toList
val lens = words.map(l => l.map(_.length)).toList
var maxlens = Map[Int,Int]() withDefaultValue 0
var maxlens = Map[Int,Int]() withDefaultValue 0