-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
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
Contravariant Functor? #15
Comments
Hm interesting! Two main reasons (as I see it) why this can be useful are: 1) a type might have |
Yes. I also think it has pedagogical and conceptual advantages -- one can understand the concepts in their parts before their combination.
I believe functions with a fixed codomain are contravariant. e.g.
|
Yea, that a good example! One problem though, I really don't want to go on a road where Static Land starts to diverse from Fantasy Land unless there are really good reasons. Would you consider to open same issue in FL repo? |
Sure! |
Would you be interested in a contravariant functor added to the spec?
It would have a method
contramap :: Contravariant f => (a -> b, f b) -> f a
. It would become a dependency toprofunctor
. The laws are pretty much the same as for functor, but with a flip on the functions in compositionHappy to make a PR for you to look over
The text was updated successfully, but these errors were encountered: