On Sun, Mar 21, 2010 at 11:31 PM, adamtheturtle <kill2thr...@hotmail.com> wrote:
> 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 <d...@zednenem.com>
<http://www.eyrie.org/~zednenem/>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to