Skip to content

Instantly share code, notes, and snippets.

@lamdor
Created August 16, 2010 04:21
Show Gist options
  • Select an option

  • Save lamdor/526402 to your computer and use it in GitHub Desktop.

Select an option

Save lamdor/526402 to your computer and use it in GitHub Desktop.
package hello {
abstract class Sayer {
def say(): String
}
object SayHello extends Sayer {
def say = "Hello"
}
package object api {
type Talker = Sayer
val HelloTalker = SayHello
}
}
package myClient {
object Main extends Application {
// println(SayHello.say)
import hello.api._
object FastTalker extends Talker {
def say = "really fast"
}
HelloTalker.say
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment