I'm reading Advanced Scala With Cats. I stuck on this example at functor description (page 59):
object FunctorsDemo extends App {
import cats.instances.function._
import cats.syntax.functor._
val func1 = (x: Int) => x.toDouble
val func2 = (y: Double) => y * 2
val func3 = func1.map(func2) // wrong line for me
}
In book everything is okay, but I have this exception:
Error:(10, 21) value map is not a member of Int => Double
val func3 = func1.map(func2)
Can't understand what I'm doing wrong.