[Haskell-cafe] Specify array or list size?

Daniel Carrera dcarrera at digitaldistribution.com
Sat May 7 17:58:29 EDT 2005


Glynn Clements wrote:

> For lists, no. For arrays, in the general case, again no. For your
> specific case, you can use an array whose indices have type Word8 (8
> bit unsigned integer), i.e.
> 
> 	import Data.Word
> 	import Data.Array
> 
> 	type ByteMap = Array Word8 Word8
> 
> For an RC4 implementation, you should probably be using Word8
> throughout rather than Int or Integer.

Thanks for the pointer! Okay, I'll start learning how Arrays and 8-bit 
words work. That'll keep me busy for a few days. :-)

Cheers,
Daniel.


More information about the Haskell-Cafe mailing list