I am trying to return the length of a list as an Integer type, but applying length xs returns the length as an Int type. How can I get around this problem?
This is what I'm trying to achieve: (it doesn't work)
sizeList :: [Integer] -> Integer sizeList xs = length xs
It works as soon as I change the return to sizeList :: [Integer] -> Int , but I don't want to do this.
source share