title: problems with understanding types in haskell
body: <p>Hey guys so I'm suppose to takes a list of words and returns a list just like it but
  with the following substitutions made each time they appear as consecutive words. </p>
  
  <p>One example is <code>you</code> and turn it into <code>u</code></p>
  
  <p>I'm given the following:</p>
  
  <pre><code>hep :: [Word] -&gt; [Word]
  type Word = String
  </code></pre>
  
  <p>now what is giving me problem is that I'm trying to use case expressions so that I won't have to repeat code but I get the following error</p>
  
  <pre><code>Couldn't match expected type `Char' with actual type `[Char]'
  In the pattern: "You"
  In a case alternative: "You" -&gt; "u" : hep xs
  In the expression: case a of { "You" -&gt; "u" : hep xs }
  </code></pre>
  
  <p>from the following code</p>
  
  <pre><code>hep [] = []
  hep [a:xs] = case a of 
      "You" -&gt; "u":hep xs
  </code></pre>
  
  <p>Anyone tell me what the problem is?</p>
  
  <p>Edit:</p>
  
  <p>I have added the following code </p>
  
  <pre><code>hep [] = [[]]
  hep (a:xs) = case a of 
      "you" -&gt; "u":hep xs
      "are" -&gt; "r":hep xs
      "your" -&gt; "ur":hep xs
      "boyfriend" -&gt; "bf":hep xs
      "girlfriend" -&gt; "gf":hep xs
      "great" -&gt; "gr8":hep xs
      a -&gt; a:hep xs
  </code></pre>
  
  <p>Now how would I be able to add a case so that if the list contains 2 or 3 certain words in an order, I could turn that into an acronym? </p>
  
  <p>Ex</p>
  
  <pre><code>["By","The","way"] = ["btw"]
  </code></pre>