![]() |
|
[Help] [Haskell] How to iterate through the bits of a bytestring? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Help] [Haskell] How to iterate through the bits of a bytestring? (/showthread.php?tid=6004158) |
[Help] [Haskell] How to iterate through the bits of a bytestring? - hdev0 - Sep 1, 2019 Hi, I'm trying to implement a function that calculates the hamming distance between two bytestrings. For that i need to iterate through the bits of each of them. How can i do that? I can only unpack the bytestring into word8s. Is there a function that unpacks the word8s into the corresponding binary representation? |