
15 Jun
2010
15 Jun
'10
8:15 p.m.
Hi Tom Try ... extractInt :: [Word8] -> Int extractInt = foldl addDigit 0 where addDigit num d = 10*num + (fromIntegral d) You might find you want to keep your functions monadic, and mostly use the Get monad from the module Data.Binary.Get for working with binary data.For instance there is a function getWord32be to do the work that extractInt is doing Best wishes Stephen