
4 Feb
2007
4 Feb
'07
2:16 p.m.
On 2/4/07, Dominic Steinitz
test1 :: Int -> [Word8] test1 n = foldl' (zipWith xor) [0x01..0x40] (blockWord8sIn512 (pad (replicate n 0x55)))
test2 :: Int -> [Word8] test2 n = foldl' (zipWith xor) [0x01..0x40] (bws (pad (replicate n 0x55)))
The problem really is here: foldl' demands the value of 'zipWith xor xs ys' (which is a list) but not its elemants. So we need a modified zipWith: zipWith' f xs ys = forceList (zipWith f xs ys) where forceList zs = foldr seq zs zs -- Tolik