Skip to content

list-ops: Improve code based on HLint's suggestions. #370

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 1 commit into from
Sep 25, 2016
Merged

list-ops: Improve code based on HLint's suggestions. #370

merged 1 commit into from
Sep 25, 2016

Conversation

rbasso
Copy link
Contributor

@rbasso rbasso commented Sep 25, 2016

The following hint should be ignored, because it would create an
example solution implementing a custom foldr with
Prelude.foldr, which is against the purpose of this exercise.

./src/Example.hs:24:5: Suggestion: Use foldr
Found:
  go [] = x0
  go (x : xs) = x `f` go xs
Why not:
  go xs = foldr f x0 xs

1 hint

Related to #355.

The following hint should be ignored, because it would create an
example solution implementing a custom `foldr` with
`Prelude.foldr`, which is against the purpose of this exercise.

```
./src/Example.hs:24:5: Suggestion: Use foldr
Found:
  go [] = x0
  go (x : xs) = x `f` go xs
Why not:
  go xs = foldr f x0 xs

1 hint
```
@rbasso rbasso merged commit fc9dc6b into exercism:master Sep 25, 2016
@rbasso rbasso deleted the list-ops-hlint-improvement branch September 25, 2016 08:08
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