Conversions between the (isomporphic) typeclasses of scalaz and algebird. No cleverness, just trying to group scattered conversion code into one place.
- Semigroup
- Monoid
- Functor
- Applicative
- Monad
Assuming we have an algebird monoid and we want to convert to scalaz:
import commbank.util._
import AlgebirdToScalaz._
import scalaz.{Monoid => SMonoid, Scalaz}, Scalaz._
import com.twitter.algebird.{Monoid => AMonoid, Max}
import com.twitter.algebird.Operators._
Max(10) |+| Max(30)
Vice-versa we use the ScalazToAlgebird
object instead.