Skip to content

Commit

Permalink
added fisher yates random shuffle method without using IO monads
Browse files Browse the repository at this point in the history
  • Loading branch information
firephil committed Mar 17, 2021
1 parent f43e238 commit 3f8ed5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Haskell-Algorithms.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ executable Haskell-Algorithms
time >=1.1,
random >=0.1,
array >= 0.5,
MonadRandom >= 0.5
MonadRandom >= 0.5,
containers >= 0.1

other-modules: Timer,
Mergesort,
Expand Down
5 changes: 3 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import Mergesort(mergeSort)
import System.Random
import Control.Monad.Random

import ShuffleList(shuffle)
import ShuffleList(shuffle,fisherYates )

ls = [1..10000]
ls = [1..8000]
rev = reverse ls
xs = fisherYates ls

main :: IO ()
main = do
Expand Down

0 comments on commit 3f8ed5b

Please sign in to comment.