/ Published in: Haskell
problem 23, Extract a given number of randomly selected elements from a list.
Example:
Prelude System.Random>rnd_select "abcdefgh" 3 >>= putStrLn
"eda"
Two problems: 1) How to return a list, and 2) how to sample without duplication
Example:
Prelude System.Random>rnd_select "abcdefgh" 3 >>= putStrLn
"eda"
Two problems: 1) How to return a list, and 2) how to sample without duplication
URL: http://haskell.org/haskellwiki/99_questions/21_to_28