-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
nucleotide-count: Change types to return an Either. #157
Comments
+1 for not not throwing any unforced errors in Haskell. |
In that case, what would |
Definitely the error message. I think this is also how most people use |
We don't need specify that. For the tests it probably would be enough to check if it is a |
fine with me. |
I'm assuming that if we'll have That seems reasonable to me (the initial suggestions of just the |
I agree with @abo64 that the original error string should be the |
If anyone is willing to write a PR, I will gladly review/merge it. 😄 Anyone? |
By using an `Either` instead of throwing an error, the resulting exercise is more idiomatic to Haskell. The `Either` will provide a useful error message to end users of the functions. Closes exercism#157
By using an `Either` instead of throwing an error, the resulting exercise is more idiomatic to Haskell. The `Either` will provide a useful error message to end users of the functions. Closes exercism#157
By using an `Either` instead of throwing an error, the resulting exercise is more idiomatic to Haskell. The `Either` will provide a useful error message to end users of the functions. Closes exercism#157
We are considering changing the interface of the problem
nucleotide-count
. The idea (#115) is to allow a more idiomatic solution to this problem, returning a Maybe, an Either or something else, instead of forcing the user to throw anerror
with the specific message: invalid nucleotide 'X'.It could be something like this:
This is just and sketch, and it can/should change. It depends only on the feedback here!
Any suggestion or comment is welcome! 😄
The text was updated successfully, but these errors were encountered: