Move scala codebase in a directory on its own

This commit is contained in:
Xavier Morel
2020-12-03 10:23:51 +01:00
parent a04451f2f7
commit 7dc5d839af
36 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import scala.io.StdIn._
val items = Iterator
.continually(readLine)
.takeWhile(_ != null)
.toList
val res = items
.combinations(2)
.map(x => x(0) zip x(1))
.dropWhile(_.count(t => t._1 != t._2) != 1)
.map(_.filter(t => t._1 == t._2).map(_._1))
.next
println(res.mkString(""))