Skip to content

Commit

Permalink
Update Enumerations.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
joelittlejohn committed May 17, 2020
1 parent 8a3e8ff commit 62f16ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/stdlib/Enumerations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Enumerations extends AnyFlatSpec with Matchers with org.scalaexercises.de

/** To create an enumeration, create an object that extends the abstract class `Enumeration`, and set a `val` variable to the method `Value`. This is a trick to give values to each `val`.
*
* `Value` assigns a numerical value to fields:
* `Value` assigns a numerical value to fields, indexed from 0:
*/
def createEnumerationEnumerations(
res0: Int,
Expand Down Expand Up @@ -149,7 +149,7 @@ object Enumerations extends AnyFlatSpec with Matchers with org.scalaexercises.de
(GreekPlanets.Neptune == GreekPlanets.Jupiter) should be(res5)
}

/** You can extend the `Enumeration` by extending the `Value` class.
/** You can extend the `Enumeration` by extending the `Val` class.
*/
def extendingValueEnumerations(res0: Double, res1: Double) = {
object Planets extends Enumeration {
Expand Down

0 comments on commit 62f16ca

Please sign in to comment.