Skip to content

Coyoneda docs - lets add some math ;) #82

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

Merged
merged 3 commits into from
May 28, 2017
Merged

Conversation

coot
Copy link
Contributor

@coot coot commented Apr 15, 2017

I was reading through Coyoneda, and made some math notes. They might be useful for others, especially for ones that are learning PureScript and are not super familiar with category theory to have enough intuition to derive all the laws that one gets for free from the structures.

@coot coot changed the title Coyoneda docs Coyoneda docs - lets add some math ;) Apr 15, 2017
@@ -78,6 +102,21 @@ unCoyoneda :: forall f g a. (forall b. (b -> a) -> f b -> g a) -> Coyoneda f a -
unCoyoneda f (Coyoneda e) = runExists (\(CoyonedaF k fi) -> f k fi) e

-- | Lift a value described by the type constructor `f` to `Coyoneda f`.
-- |
-- | Note that for any `f` `liftCoyoneda` has a right inverse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For any functor f.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. For any f it has a left inverse.

ps. I will have more pr like this one.

@paf31
Copy link
Contributor

paf31 commented Apr 15, 2017

Looks good to me, just one minor nitpick. Thanks!

@paf31 paf31 merged commit 346fd8e into purescript:master May 28, 2017
@paf31
Copy link
Contributor

paf31 commented May 28, 2017

Thanks!

@coot coot deleted the coyoneda-docs branch June 13, 2017 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants