Skip to content

Conversation

@garyb
Copy link
Member

@garyb garyb commented Oct 2, 2016

No description provided.

@garyb
Copy link
Member Author

garyb commented Oct 2, 2016

@paf31 any comments here?


instance bindFirst :: Bind First where
bind (First x) f = First (bind x (runFirst <<< f))
bind (First x) f = First (x >>= \y -> case f y of First ma -> ma)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be derivable.


instance bindLast :: Bind Last where
bind (Last x) f = Last (bind x (runLast <<< f))
bind (Last x) f = Last (x >>= \y -> case f y of Last ma -> ma)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

@paf31
Copy link
Contributor

paf31 commented Oct 2, 2016

Sorry didn't see this one. Nothing blocking, just noticed a couple of possibly-derivable instances. Thanks!

@paf31 paf31 closed this Oct 2, 2016
@paf31 paf31 reopened this Oct 2, 2016
@garyb
Copy link
Member Author

garyb commented Oct 2, 2016

Nice, thanks for the reminder - they're almost entirely derivable 😄

@garyb garyb merged commit bd1e507 into master Oct 2, 2016
@garyb garyb deleted the bump branch October 2, 2016 23:05
@paf31
Copy link
Contributor

paf31 commented Oct 2, 2016

They should be marginally faster too, which is good.

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.

3 participants