I wrote an implementation for foldl and wanted to check if it worked, I tried some cases and it seems to be working well but I want to make sure.
I read about quickCheck and tried it, but I can't seem to make it work, this is the code
foldl'' :: (b -> a -> b) -> b -> [a] -> b
test :: Eq b => (b -> a -> b) -> b -> [a] -> Bool
test f e ls = foldl'' f e ls == foldl f e ls
when I run quickCheck test
it throws the following error:
No instance for (Show (b0 -> a0 -> b0))
arising from a use of `quickCheck'
Possible fix:
add an instance declaration for (Show (b0 -> a0 -> b0))
In the expression: quickCheck prueba
In an equation for `it': it = quickCheck prueba