[Haskell-cafe] Perfect shuffle on std. libs
Isaac Dupree
isaacdupree at charter.net
Sun Jul 15 19:13:36 EDT 2007
Felipe Almeida Lessa wrote:
> I'd personally like to have at least the function
>
>> shuffle :: RandomGen g => g -> [a] -> [a]
Me too (along with permutations and a few, perhaps. shuffle doesn't
create very long lists it doesn't start with, though, which makes me
feel good about this...) shuffle is tricky to implement correctly, so
its absence usually causes trouble (when it is needed), so it is worth
including, IMO. Where should it be put? System.Random already doesn't
make sense to me (why System?); Random. ? Statistics. ??
Isaac
More information about the Haskell-Cafe
mailing list