-
-
Notifications
You must be signed in to change notification settings - Fork 196
Implementing protein-translation #630
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
Conversation
@petertseng The Travis errors are all because the README ¿aren't they? |
I will review when I am able. I am sorry to say that I am currently unable. |
@petertseng Don't worry, I have no rush. Too much AoC? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests seems reasonable and the implementation is reasonable, so I think I only ask to change the placement and some versions.
There is the natural question of: Should either the nucleotides ACGU or the codons (Methionine, Tryptophan, etc) be made into a data
, but I don't think it's needed, and I think I interpret #626 (comment) to agree with that (I hope I did not interpret)
|
||
proteins :: String -> Maybe [String] | ||
proteins xs = if length xs `mod` 3 == 0 && all validCodon codons | ||
then Just (takeWhile (/= "STOP") (map proteins' codons)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the extra space after then
could go away
@@ -0,0 +1,20 @@ | |||
name: protein-translation | |||
version: 1.1.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.0.1.1 because https://github.com/exercism/problem-specifications/blob/master/exercises/protein-translation/canonical-data.json#L3 says 1.0.1 (unless it changes after I wrote this comment)
It changed, so 1.1.0.1 is correct.
@@ -0,0 +1 @@ | |||
resolver: lts-9.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved to lts-10.2
@@ -0,0 +1,3 @@ | |||
```Haskell | |||
f = error "regenerate me!"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remind myself
@@ -13,6 +13,16 @@ | |||
"topics": [ | |||
] | |||
}, | |||
{ | |||
"uuid": "f750e380-fe16-42c0-8b3d-8acd7e443a6e", | |||
"slug": "protein-translation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't put this between hello-world and leap because leap seems easier since don't have to deal with lists or Maybe. So at the very least, after leap
.
And what about Data.List.Split? How can I do to make use of it? |
You are optionally free to do so if you want to, but it is not required. If you want ideas, you can see how other exercises use it.
|
I know how to use it, but the build complains about it, dont know why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be good now
made it difficulty 3
I wanted to use
chunksOf
from Data.List.Split but apparently it is not in the cabal configuration