Skip to content

Instantly share code, notes, and snippets.

Created Apr 2, 2015
What would you like to do?
object Color extends Enumeration {
val Blue, Red, Magenta, Green, Cyan, Yellow, White = Value
object Main {
import Color._
def mix(a:Color.Value, b:Color.Value): Color.Value = {
Color( +
def main(args: Array[String]): Unit = {
// mix
println(mix(Blue, Blue))
// mix
println(mix(Blue, Red))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment