I created Factorial program using foldl and foldr as shown below. But when i try to find factorial of large number like 100000 it gives: ERROR - C stack overflow
Where as, if i use product function it gives me the result after long time.
foldl (*) 1 [1..100000]
product [1..100000]
Why am i getting different behavior? I am new to Haskell hence trying to understand different concepts by writing program like these.