Permalink
Browse files

eliminate costly "length" call on full sequence

  • Loading branch information...
1 parent 6139c96 commit 57571c4f1fd6eb0e0399ddae2bdd639991328054 @gbenison committed Jun 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 fastanotate.hs
View
@@ -38,7 +38,7 @@ isStopCodon _ = False
orfLength::(Integral a)=>[Char]->a
orfLength seq = iter 0 seq
- where iter n seq | length seq < 3 = n
+ where iter n seq | seq == "" = n
| isStopCodon seq = n
| otherwise = iter (n + 3)(drop 3 seq)

0 comments on commit 57571c4

Please sign in to comment.