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

rna-transcription: Change return type to Maybe #166

Closed
samjonester opened this issue Jun 29, 2016 · 3 comments
Closed

rna-transcription: Change return type to Maybe #166

samjonester opened this issue Jun 29, 2016 · 3 comments

Comments

@samjonester
Copy link
Contributor

This exercise doesn't define a test case for "non dna" characters, so many people are throwing errors for invalid input unnecessarily. It seems like that solution has gone viral, and since it's early in the haskell track could influence people to throw errors instead of using the safer type of Maybe. Thoughts on making this change?

@samjonester
Copy link
Contributor Author

The exercise, for reference. http://exercism.io/exercises/haskell/rna-transcription/readme

@kytrinyx
Copy link
Member

This sounds like a good move to me. That would align with other changes we've been making, per #115

@rbasso
Copy link
Contributor

rbasso commented Jun 29, 2016

👍 for that!

We could even supply a stub DNA.hs as we do forth, list-ops and zipper, so people will not have to infer the signature.

@rbasso rbasso changed the title Change RNA Transcription Return Type to Maybe rna-transcription: Change return type to Maybe Jun 30, 2016
samjonester added a commit to samjonester/xhaskell that referenced this issue Jun 30, 2016
- Error case is now defined, eliminating the desire to throw an `error`
for invalid input.
- The test and example solution are more idiomatic to Haskell, using a
  `Maybe`.

Closes exercism#166
samjonester added a commit to samjonester/xhaskell that referenced this issue Jun 30, 2016
- Error case is now defined, eliminating the desire to throw an `error`
for invalid input.
- The test and example solution are more idiomatic to Haskell, using a
  `Maybe`.

Closes exercism#166
samjonester added a commit to samjonester/xhaskell that referenced this issue Jun 30, 2016
- Error case is now defined, eliminating the desire to throw an `error`
for invalid input.
- The test and example solution are more idiomatic to Haskell, using a
  `Maybe`.

Closes exercism#166
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

No branches or pull requests

3 participants