[Haskell-cafe] Linear shuffle

Tomasz Zielonka tomasz.zielonka at gmail.com
Fri Jan 14 03:45:26 EST 2005

On Fri, Jan 14, 2005 at 09:17:41AM +0100, Gracjan Polak wrote:
> This algorithm seems not effective, length, take, drop and (!!) are 
> costly. Is there any better way to implement shuffle?

You can use mutable arrays (modules Data.Array.MArray, Data.Array.IO). 

Best regards,

More information about the Haskell-Cafe mailing list