title: Division in Haskell
body: <p>I'm making a function in Haskell that halves only the evens in a list and I am experiencing a problem. When I run the complier it complains that you can't perform division of an int and that I need a fractional int type declaration. I have tried changing the type declaration to float, but that just generated another error. I have included the function's code below and was hoping for any form of help.</p>
  
  <pre><code>halfEvens :: [Int] -&gt; [Int]
  halfEvens [] = []
  halfEvens (x:xs) | odd x = halfEvens xs
                   | otherwise = x/2:halfEvens xs
  </code></pre>
  
  <p>Thank you for reading.</p>