Haskell 3-Way Merge Sort Stack Overflow Exception
I am new to Haskell and functional programming. I am trying to write the 3-way merge sort algorithm in Haskell. Problem is, when I run the code in GHCi it just returns *** Exception: stack overflow
. I have been trying to understand the problem, but I got no solution. If anyone can help, I would appreciate it. The code and the output is below.
Haskell 3-Way Merge Sort Stack Overflow Exception
I am new to Haskell and functional programming. I am trying to write the 3-way merge sort algorithm in Haskell. Problem is, when I run the code in GHCi it just returns *** Exception: stack overflow
. I have been trying to understand the problem, but I got no solution. If anyone can help, I would appreciate it. The code and the output is below.