They are pretty much the same thing. Yes, only the first of the following codes can be compiled:
sorting String:
val ss = Seq(
"abc",
"def"
)
ss.sorted
sorted Seq:
val ss = Seq(
"abc",
"def"
)
.map(_.toSeq)
ss.sorted
What's the point of such design?