
21 Mar
2010
21 Mar
'10
11:44 p.m.
On Sun, Mar 21, 2010 at 11:31 PM, adamtheturtle
So I have the code
shuffle :: Int -> [a] -> [a] shuffle i [] = [] shuffle i cards = (cards!!i) : shuffle (fst pair) (delete (cards!!i) cards) where pair = randomR (0, 51) (mkStdGen 42)
and it doesn't work, am I missing something?
Are you familiar with class constraints? Try looking at the type of
delete. (Use ":type" at the ghci prompt.)
--
Dave Menendez