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

strain: Add test for non-strict keep and discard #210

Merged
merged 1 commit into from
Jul 19, 2016
Merged

strain: Add test for non-strict keep and discard #210

merged 1 commit into from
Jul 19, 2016

Conversation

petertseng
Copy link
Member

Just as d238a33 added a test for
accumulate to be non-strict, we add a test for keep and discard that
does the same.

For the purpose of #194
Closes #208

Just as d238a33 added a test for
accumulate to be non-strict, we add a test for keep and discard that
does the same.

For the purpose of #194
Closes #208
["yes"] @=? take 1 (keep (const True) ws)
, testCase "discard non-strict" $ do
let ws = "yes" : error "discard should be lazier - don't look at list elements you don't need!"
["yes"] @=? take 1 (discard (const False) ws)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice error messages!

@rbasso rbasso merged commit 67533af into exercism:master Jul 19, 2016
@petertseng petertseng deleted the strain-non-strict branch July 19, 2016 03:24
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