[Haskell-beginners] help with optimizing memory usage of thunk size of Monte Carlo backtracking search algorithm