We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Distributive looks like this:
trait Distributive[F[_]] extends Functor[F] { self => def distribute[G[_]:Functor,A,B](fa: G[A])(f: A => F[B]): F[G[B]] def cosequence[G[_]:Functor,A](fa: G[F[A]]): F[G[A]] }
But in Haskell and Purescript this looks differently:
collect :: Functor f => (a -> g b) -> f a -> g (f b) distribute :: Functor f => f (g a) -> g (f a)
So probably in Scala implementation should be more like this:
trait Distributive[F[_]] extends Functor[F] { def collect[G[_]:Functor,A,B](fa: G[A])(f: A => F[B]): F[G[B]] def distribute[G[_]:Functor,A](fa: G[F[A]]): F[G[A]] }
well, if we want to have co-name then maybe:
trait Distributive[F[_]] extends Functor[F] { def cotraverse[G[_]:Functor,A,B](fa: G[A])(f: A => F[B]): F[G[B]] def distribute[G[_]:Functor,A](fa: G[F[A]]): F[G[A]] }
Maybe I am missing something :)
The text was updated successfully, but these errors were encountered:
Cats Distributive also has this feature/bug. Relevant PR: typelevel/cats#2046
Sorry, something went wrong.
No branches or pull requests
Implementation of Distributive looks like this:
But in Haskell and Purescript this looks differently:
So probably in Scala implementation should be more like this:
well, if we want to have co-name then maybe:
Maybe I am missing something :)
The text was updated successfully, but these errors were encountered: