What is a Singleton Type exactly?
If you think of a type as a set of values, the singleton type of a value x is the type which only contains this value ({x}). Usage examples: Pattern matching: case _: Foo.type checks that the matched object is the same as Foo using eq, where case Foo only checks that it’s equal to … Read more