Updated Haskell version of assignment, still needs a lot more work
Going to make sure the new algorithm works by testing it with the C++ version