Skip to content

Instantly share code, notes, and snippets.

View hipjim's full-sized avatar
🌴
On vacation

Cristian Popovici hipjim

🌴
On vacation
  • Timisoara
View GitHub Profile
@hipjim
hipjim / scala type class
Last active January 4, 2016 11:28
scala type class
trait M[T] {
def plus(x:T,y:T): T
def zero: T
}
implicit object IntM extends M[Int] {
def plus(x:Int, y:Int) = x + y
def zero = 0;
}
@hipjim
hipjim / gist:8027043
Created December 18, 2013 18:11
basic cake scala
/**
* Created by cristipopovici on 12/18/13.
*/
trait LifeCycle {
def startup(): Unit
def shutdown(): Unit
}