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

Return Pair for Writer's read method #150

Merged
merged 1 commit into from
Nov 8, 2017
Merged

Return Pair for Writer's read method #150

merged 1 commit into from
Nov 8, 2017

Conversation

evilsoft
Copy link
Owner

@evilsoft evilsoft commented Nov 6, 2017

A bit more flexible

image

I really hate the lack of usability with the Writer's read function. I also not like how it removed the Monoid from the log value. This PR now returns a Pair for w.read() with the Monoid wrapped log in the fst and the value in the snd.

With this change we now get the power of a Pair when we are done with the writing. Also it makes more sense as Pair is the canonical Product type.

This is a BREAKING change, will not depreciate, just changing straight away.

@coveralls
Copy link

coveralls commented Nov 6, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 7651fdb on writer-pair into 0662911 on master.

@coveralls
Copy link

coveralls commented Nov 6, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 6d695e4 on writer-pair into 0662911 on master.

@evilsoft
Copy link
Owner Author

evilsoft commented Nov 8, 2017

image

@evilsoft evilsoft merged commit 5f13597 into master Nov 8, 2017
@evilsoft evilsoft deleted the writer-pair branch November 8, 2017 02:47
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