title: Understanding scala enumerations
body: <p>I have to say I don't understand Scala enumeration classes. I can copy-paste the example from documentation, but I have no idea what is going on.</p>
  
  <pre><code>object WeekDay extends Enumeration {
    type WeekDay = Value
    val Mon, Tue, Wed, Thu, Fri, Sat, Sun = Value
  }
  import WeekDay._
  </code></pre>
  
  <ul>
  <li>What means <code>type WeekDay = Value</code> and why do I have to write that? </li>
  <li>Why is <code>val Mon = Value</code>?  What does that even mean?</li>
  <li>Why do I have to import the <code>WeekDay</code>
  object?  And,</li>
  <li>when I write <code>val day = WeekDay.Mon</code>, why is it type <code>WeekDay.Value</code>, not type <code>WeekDay</code>?</li>
  </ul>