Skip to content

Instantly share code, notes, and snippets.

View sungjk's full-sized avatar
🇰🇷
sup

Jeremy Kim sungjk

🇰🇷
sup
View GitHub Profile
@sungjk
sungjk / MonadTransformer.scala
Last active April 30, 2018 09:06
MonadTransformer
import scala.concurrent.Future
import scala.language.higherKinds
sealed trait Monad[T[_]] {
def map[A, B](value: T[A])(f: A => B): T[B]
def flatMap[A, B](value: T[A])(f: A => T[B]): T[B]
def pure[A](x: A): T[A]
}