Implementing protein-translation#630
Implementing protein-translation#630petertseng merged 6 commits intoexercism:masterfrom Average-user:protein
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? |
petertseng
left a comment
There was a problem hiding this comment.
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.
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.
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 | |||
| @@ -0,0 +1,3 @@ | |||
| ```Haskell | |||
| f = error "regenerate me!"" | |||
config.json
Outdated
| }, | ||
| { | ||
| "uuid": "f750e380-fe16-42c0-8b3d-8acd7e443a6e", | ||
| "slug": "protein-translation", |
There was a problem hiding this comment.
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 |
petertseng
left a comment
There was a problem hiding this comment.
should be good now
made it difficulty 3
I wanted to use
chunksOffrom Data.List.Split but apparently it is not in the cabal configuration