How can I say that Haskell interprets something as a special type? For example, I have a list and I want to divide its length by 2. Therefore, I write
(length mylist) / 2
and get this error
No instance for (Fractional Int) arising from the use of `/ '
How I want integer division, I would like to make length mylist , 2 and result Int .
source share