Skip to content

Instantly share code, notes, and snippets.

@fff
fff / feed monkey with banana(s).scala
Created November 16, 2010 12:52
why generic failed?
class Banana
object Monkey {
def eat(bananas: Seq[Banana]) = println("lots of banana")
def eat(banana: Banana) = println("one banana")
}
object Person {
def pickBanana = new Banana
def pickBananas = List(new Banana, new Banana)