Given below is a small haskell function used to generate a recursive sequence. I'm getting a type error while using floor function. floor function is expecting RealFrac, I suppose. The code and error are given below.
main = do
print( funSeq 9)
funSeq n = do
if (n<4)
then 1
else floor ((funSeq (n-1) + funSeq (n-2)) * (funSeq (n-3)/ funSeq(n-4)))
Error:
No instance for (RealFrac a0) arising from a use of 'funSeq'