Skip to content

Instantly share code, notes, and snippets.

View frroliveira's full-sized avatar

Filipe Oliveira frroliveira

View GitHub Profile
@frroliveira
frroliveira / IorT.scala
Created October 1, 2017 10:52
Proposal of Monad Transformer for Ior
package cats.data
import cats.functor.Bifunctor
import cats.kernel.{Monoid, Semigroup}
import cats.{Applicative, Apply, Bitraverse, Eq, Eval, Foldable, Functor, Monad, MonadError, SemigroupK, Show, Traverse}
final case class IorT[F[_], A, B](value: F[Ior[A, B]]) {
def fold[C](fa: A => C, fb: B => C, fc: (A, B) => C): C = ???
def isLeft(implicit F: Functor[F]): F[Boolean] = ???