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

Remove misleading example #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erikwright
Copy link

While the example is interesting in that it shows an example of advanced pattern matching, it is problematic in that the pattern used is not of a valid type for the rest of the code.

As it is not really relevant to the issue at hand, and given that it's a relatively advanced example not likely to be relevant to someone first learning the language, I suggest simply removing it. A separate section on advanced pattern matching could potentially cover it.

Fixes #34

While the example is interesting in that it shows an example of advanced pattern matching, it is problematic in that the pattern used is not of a valid type for the rest of the code.

As it is not really relevant to the issue at hand, and given that it's a relatively advanced example not likely to be relevant to someone first learning the language, I suggest simply removing it. A separate section on advanced pattern matching could potentially cover it.

Fixes scala-exercises#34
@AdrianRaFo
Copy link
Collaborator

AdrianRaFo commented May 2, 2019

I suggest to change it to:

// A list that starts with `2`	
     case 2 :: xs => …

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.

list exercise error
2 participants