title: Toggle every element in a list in haskell
body: <p>I have to write a function that toggles a list of given Booleans for example :</p>
  <p><em>input : <code>toggle [True,False,False]</code></em></p>
  <p><em>output: <code>[False,True,True]</code></em></p>
  <p>This is what I came up with</p>
  <pre><code>toggle :: [Bool] -&gt; [Bool]
  toggle [a] = not a:[a]
  toggle [] = []
  </code></pre>
  <p>And I keep getting this error:</p>
  <p><code>*** Exception: Uebung3.hs:38:1-20: Non-exhaustive patterns in function toggle</code></p>
  <p>It's a very basic question, I come from Java and have just started to learn Haskell.</p>