All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.fp.NaturalTransformation.scala Maven / Gradle / Ivy

The newest version!
package org.specs2.fp

trait NaturalTransformation[-F[_], +G[_]] {
  def apply[A](fa: F[A]): G[A]
}

object NaturalTransformation {

  implicit def naturalId[M[_] : Monad]: NaturalTransformation[Id, M] = new NaturalTransformation[Id, M] {
    def apply[A](fa: Id[A]): M[A] =
      Monad[M].point(fa)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy