Hacker News new | ask | show | jobs
by codygman 4131 days ago
Yep this works:

    λ> import Data.Bits
    λ> let integerWithBytes = foldr (\byte acc -> (acc `shiftL` 8) + fromIntegral byte) 0
    λ> integerWithBytes [0xFF, 0xFF, 0xFF, 0xFF]
    4294967295