2 ms·
Yep this works: λ> import Data.Bits λ> let integerWithBytes = foldr (\byte acc -> (acc `shiftL` 8) + fromIntegral byte) 0 λ> integerWithBytes [0xFF
by codygman 12y ago
Yep this works:
λ> import Data.Bits
λ> let integerWithBytes = foldr (\byte acc -> (acc `shiftL` 8) + fromIntegral byte) 0
λ> integerWithBytes [0xFF, 0xFF, 0xFF, 0xFF]
4294967295