Skip to content
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

Changed Identity bind definition #14

Merged
merged 1 commit into from Jun 15, 2014
Merged

Changed Identity bind definition #14

merged 1 commit into from Jun 15, 2014

Conversation

dmjio
Copy link
Contributor

@dmjio dmjio commented Jun 15, 2014

@EdwardK, Shouldn't the defintion of bind for Identity be

Identity x >>= f == f x

instead of

Identity x >>= f == Identity (f x)

or am I missing something

@ekmett
Copy link
Member

ekmett commented Jun 15, 2014

You're missing something.

f :: a -> Identity b

already puts the Identity on.

@ekmett ekmett closed this Jun 15, 2014
@dmjio
Copy link
Contributor Author

dmjio commented Jun 15, 2014

Yes, exactly, so the correct defintion should be Identity x >>= f == f x and not Identity x >>= f == Identity (f x) as the docs describe.

Identity x >>= f == Identity (f x) -- <-- The docs put it on twice

@dmjio
Copy link
Contributor Author

dmjio commented Jun 15, 2014

@ekmett
Copy link
Member

ekmett commented Jun 15, 2014

Ah. woops. I had read your patch backwards.

@ekmett ekmett reopened this Jun 15, 2014
ekmett added a commit that referenced this pull request Jun 15, 2014
Changed Identity bind definition
@ekmett ekmett merged commit c11bde8 into haskell:master Jun 15, 2014
@dmjio
Copy link
Contributor Author

dmjio commented Jun 15, 2014

Cool, thanks!

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.

None yet

2 participants