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
I should add that using map would simplify the code.
map
HalfIfEven n | even n = n `div` 2 | otherwise = n halfEvens = map halfIfEven