Skip to content

Commit

Permalink
Update beer-song to match latest canonical json.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricemery committed Feb 13, 2018
1 parent 89c8977 commit b73623e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 36 deletions.
6 changes: 3 additions & 3 deletions exercises/beer-song/example.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Example {
def verses(upper: Int, lower: Int): String =
upper to lower by -1 map verse mkString "\n"
object BeerSong {
def recite(start: Int, takeDown: Int): String =
start until (start - takeDown) by -1 map verse mkString "\n"

def verse(n: Int): String = n match {
case 0 => "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
Expand Down
Loading

0 comments on commit b73623e

Please sign in to comment.