Eric Reed <[email protected]> wrote: > In general, monads require higher-kinded types because for a type to be a > monad it must take a type variable. That is, Option<T> and List<T> could > be monads, but int and TcpSocket can't be monads. So imagine we wanted to > define a trait Monad in Rust.
Just for my understanding. Is there an inherent reason that a monad has to be a higher kinded type (type constructor)? Couldn't it also be represented somehow as a multiparam trait/typeclass? AFAIK, higher kinded types are standard haskell, while MPTCs are not, so it's the obvious choice for haskell. Is it also for rust? Tobi _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
