You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* scala> mkTrafficLightThenShow("red")
* = "Traffic light is red"
*
* scala> mkTrafficLightThenShow("bob")
* = "Traffic light `bob` is invalid"
*
* Hint: Use `mkTrafficLight` and pattern matching.
*
* You can pattern match on `Option` using its two constructors `Some` and `None`:
*
* ```
* optSomething match {
* case Some(a) => // do something with `a`
* case None => // do something else
* }
* ```
*/
def mkTrafficLightThenShow(str: String): String = ???
should change to:
/**
* scala> mkTrafficLightThenShow("red")
* = "Traffic light is red"
*
* scala> mkTrafficLightThenShow("yellow")
* = "Traffic light is yellow"
*
* scala> mkTrafficLightThenShow("green")
* = "Traffic light is green"
*
* scala> mkTrafficLightThenShow("bob")
* = "Traffic light `bob` is invalid"
*
* Hint: Use `mkTrafficLight` and pattern matching.
*
* You can pattern match on `Option` using its two constructors `Some` and `None`:
*
* ```
* optSomething match {
* case Some(a) => // do something with `a`
* case None => // do something else
* }
* ```
*/
def mkTrafficLightThenShow(str: String): String = ???
The text was updated successfully, but these errors were encountered:
This:
should change to:
The text was updated successfully, but these errors were encountered: