Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Minimal FizzBuzz implementation in Scala

View FizzBuzz.scala
1 2 3 4 5 6 7 8 9 10 11 12
package org.scalabound.scatdd
 
object FizzBuzz {
def eval(x: Int) = (x % 3, x % 5, x) match {
case(0, 0, _) => "FizzBuzz"
case(0, _, _) => "Fizz"
case(_, 0, _) => "Buzz"
case _ => "" + x
}
 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.