Function: map[A, B](F[A])(A => B): F[B]
Monad[M[_]]
In [1]:
classpath.add(
"org.typelevel" %% "cats-core" % "1.0.0-RC1"
);
In [6]:
import cats._, cats.instances.all._
In [7]:
val len: String => Int = _.length
In [8]:
Functor[List].map(List("scala", "cats")) (len)
In [20]:
Functor[List].map(List[Int](1, 2, 3)) (_ / 2L)
In [21]:
import cats.syntax.functor._
In [24]:
List("s", "cats").fproduct(len)
To be continued...