Skip to content

Commit

Permalink
Fix decode decoding vowel sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
IvoTod committed Nov 1, 2016
1 parent 0c29599 commit da63f1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/secret-lang/Secret-lang.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ dropN number (first:rest) = dropN (number-1) rest
decode :: String -> String
decode [] = []
decode (x : 'o' : y : rest)
| x == y = x : decode (dropN 2 ('o':y:rest))
| x == y && isConsonant x = x : decode (dropN 2 ('o':y:rest))
| otherwise = x : 'o' : y : (decode (rest))
decode (first : rest) = first : decode (rest)

0 comments on commit da63f1d

Please sign in to comment.