Skip to content

Commit

Permalink
Merge pull request exercism#496 from ricemery/beer
Browse files Browse the repository at this point in the history
Update beer-song to match latest canonical json.
  • Loading branch information
ErikSchierboom authored Feb 13, 2018
2 parents 89c8977 + b73623e commit 373e214
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 373e214

Please sign in to comment.