Why scala's TreeSet returns SortedSet

Posted by Elazar Leibovich on Stack Overflow See other posts from Stack Overflow or by Elazar Leibovich
Published on 2010-03-25T05:01:40Z Indexed on 2010/03/25 6:03 UTC
Read the original article Hit count: 389

Filed under:
|

Is there a reason that the object TreeSet.apply method returns SortedSet and not TreeSet?

The following code won't compile in scala 2.7

val t:TreeSet[Int] = TreeSet(1,2,3)

© Stack Overflow or respective owner

Related posts about scala

Related posts about treeset