Hello all,

Something's always bothered me about map and zipWith for ByteString. Why is it

    map :: (Word8 -> Word8) -> ByteString -> ByteString

but

    zipWith :: (Word8 -> Word8 -> a) -> ByteString -> ByteString -> [a]

? Obviously they can be transformed into each other with pack/unpack, and as I understand it, the compiler performs sufficient optimizations so that there's no performance hit to doing things like (pack $ zipWith xor a b), but it still seems inconsistent. Is there a deep reason for this?

--
Scott Lawrence

Linux baidar 3.10.9-1-ARCH #1 SMP PREEMPT Wed Aug 21 13:49:35 CEST 2013 x86_64 
GNU/Linux
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to