Scala Nil equivalent for Set
Set.empty is that set; although you can’t get at it directly, it turns out that it is just a private object in the Set companion object (called, obviously enough, EmptySet). All that Set.empty does is return that set with a cast to the correct type. It is done this way, instead of with Nil, because … Read more