added test code to perform permutation test in haskell