by jonshea · 14y ago · 0 comments
Why does `toSeq` compile, but not `toIndexedSeq`?
Set(1,2,3).toIndexedSeq sortBy (-_)
Set(1,2,3).toSeq sortBy (-_)
Why does `h` compile, but `f` does not? def add(x: Int, y: Int) = x + y
val f = add(1,_)
val h = add(_,_)The other looks like some quirk of partial application. It's unlikely there's any fundamental reason, only an implementation imperfection.