I just understood what type constructor and higher kinded types states for and now I'm trying to understand Monad. Here is how Monad trait looks in scalaz:
trait Monad[F[_]] extends Applicative[F] with Bind[F] { self =>
////
override def map[A,B](fa: F[A])(f: A => B) = bind(fa)(a => point(f(a)))
//The rest is omitted
}
The question is I don't kind of understand why Monad is a higher kinded type? We have standard List[T], Option[T] monads which are not higher kinded types.
I'm not a Theory Category expert so I treat monad as a container with monads laws.
Why don't we just declare a monad as follows:
trait Monad[V]{
//...
}
Not a higher kind.
How would standard Option[T] monad look like in that case as a a subclass for instance?
Option,Listetc.) and the functionspureandbind/join. The monad trait needs to have a higher kind to abstract over the type constructors. - Lee