Skip to content

Commit

Permalink
Fix wording in NamedandDefaultArguments.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
joelittlejohn authored May 17, 2020
1 parent 8a3e8ff commit 1a6a033
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/scala/stdlib/NamedandDefaultArguments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,18 @@ object NamedandDefaultArguments
*
* }}}
*
* Can specify arguments in any order if you use their names:
* You can specify arguments in any order if you use their names:
*/
def classWithoutParametersNamedandDefaultArguments(res0: Int, res1: Int, res2: Int) = {
val me = new WithoutClassParameters()

// what happens if you change the order of these parameters (nothing)
// What happens if you change the order of these parameters? Nothing.
val myColor = me.addColors(green = 0, red = 255, blue = 0)

// for koan, remove the values in the should equal
myColor should equal((res0, res1, res2))
}

/** Can default arguments if you leave them off:
/** You can default arguments if you leave them off:
*/
def defaultArgumentsNamedandDefaultArguments(res0: Int, res1: Int, res2: Int) = {
val me = new WithoutClassParameters()
Expand All @@ -105,7 +104,7 @@ object NamedandDefaultArguments
myColor should equal((res0, res1, res2))
}

/** Can access class parameters and specify arguments in any order if you use their names:
/** You can access class parameters and specify arguments in any order if you use their names:
*/
def anyOrderNamedandDefaultArguments(res0: Int, res1: Int, res2: Int) = {
val me = new WithClassParameters(40, 50, 60)
Expand All @@ -114,7 +113,7 @@ object NamedandDefaultArguments
myColor should equal((res0, res1, res2))
}

/** Can access class parameters and default arguments if you leave them off:
/** You can access class parameters and default arguments if you leave them off:
*/
def accessClassParametersNamedandDefaultArguments(res0: Int, res1: Int, res2: Int) = {
val me = new WithClassParameters(10, 20, 30)
Expand All @@ -123,7 +122,7 @@ object NamedandDefaultArguments
myColor should equal((res0, res1, res2))
}

/** Can default class parameters and have default arguments too:
/** You can default class parameters and have default arguments too:
*/
def defaultClassArgumentsNamedandDefaultArguments(res0: Int, res1: Int, res2: Int) = {
val me = new WithClassParametersInClassDefinition()
Expand Down

0 comments on commit 1a6a033

Please sign in to comment.