Why is Option not Traversable?
问题 Is there any rational for Option not being Traversable ? In Scala 2.9, Seq(Set(1,3,2),Seq(4),Option(5)).flatten doesn't compile and simply having it to implement the Traversable trait seams rational to me. If it's not the case, there must be something I don't see that don't allow it. What is it? PS: While trying to understand, I achieved awful things that compile, like: scala> Seq(Set(1,3,2),Seq(4),Map("one"->1, 2->"two")).flatten res1: Seq[Any] = List(1, 3, 2, 4, (one,1), (2,two)) PS2: I