[Haskell-cafe] Re: Binary IO of a list of ints

Stephan Walter stephan at walter.name
Thu Jan 24 07:02:27 EST 2008


Hi,

On 2008-01-24 12:14, Jamie Love wrote:
> I have a list of ints, with values between 0 and 255 and I need to print 
> them out in little endian form to a file.

How about just using Data.Char.chr ?

Prelude> let a = [32..64] :: [Int]
Prelude> map Data.Char.chr a
" !\"#$%&'()*+,-./0123456789:;<=>?@"


--Stephan



More information about the Haskell-Cafe mailing list