Skip to content

Commit

Permalink
override MonadCombine[OptionT[F, ?]]#ap
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Oct 15, 2015
1 parent fa0427e commit abece12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/scala/cats/data/OptionT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ trait OptionTInstances extends OptionTInstances1 {
new MonadCombine[OptionT[F, ?]] {
def pure[A](a: A): OptionT[F, A] = OptionT.pure(a)

override def ap[A,B](fa: OptionT[F, A])(f: OptionT[F, A => B]): OptionT[F, B] =
fa.ap(f)

def flatMap[A, B](fa: OptionT[F, A])(f: A => OptionT[F, B]): OptionT[F, B] =
fa.flatMap(f)

Expand Down

0 comments on commit abece12

Please sign in to comment.