Skip to content

Commit

Permalink
Fixes #418
Browse files Browse the repository at this point in the history
  • Loading branch information
barkhorn authored Dec 18, 2021
1 parent 0ce9850 commit 0ae7544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ For simplicity's sake, this has only one method called `sayHello` which can form
```scala
object Greetings {
trait Formatter { def format(s: String): String }
object EnglishFormatter { def format(s: String): String = s"Hello $s" }
object GermanFormatter { def format(s: String): String = s"Hallo $s" }
object JapaneseFormatter { def format(s: String): String = s"こんにちは $s" }
object EnglishFormatter extends Formatter { def format(s: String): String = s"Hello $s" }
object GermanFormatter extends Formatter { def format(s: String): String = s"Hallo $s" }
object JapaneseFormatter extends Formatter { def format(s: String): String = s"こんにちは $s" }

def sayHello(name: String, formatter: Formatter): Unit = {
println(formatter.format(name))
Expand Down

0 comments on commit 0ae7544

Please sign in to comment.