<p dir="ltr">I did use that a couple of times (`xor`ing 2 ByteStrings together), and was surprised by the omission back then, but IIRC (can&#39;t validate now), there&#39;s a specialised zipWith (as proposed) in the module (with some other name, obviously), which is not exported, but used when you &#39;pack&#39; the result of &#39;zipWith&#39; when the result is &#39;[Word8]&#39;... You might want to look into that.</p>

<p dir="ltr">Nicolas</p>
<div class="gmail_quote">On Sep 12, 2013 8:11 PM, &quot;John Lato&quot; &lt;<a href="mailto:jwlato@gmail.com">jwlato@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Carter: we don&#39;t have both.  We have one function from each category.  My guess is nobody&#39;s ever really needed a really fast zipWith :: (Word8-&gt;Word8-&gt;Word8) -&gt; ByteString -&gt; ByteString -&gt; ByteString; that&#39;s the only reason I can think of for its omission.<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 10:45 AM, Carter Schonwald <span dir="ltr">&lt;<a href="mailto:carter.schonwald@gmail.com" target="_blank">carter.schonwald@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Scott: benchmark the two and you&#39;ll see why we have both :-)<div><div><span></span><br><br>
On Thursday, September 12, 2013, Scott Lawrence  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, 12 Sep 2013, Tom Ellis wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Something&#39;s always bothered me about map and zipWith for ByteString. Why is it<br>
<br>
    map :: (Word8 -&gt; Word8) -&gt; ByteString -&gt; ByteString<br>
<br>
but<br>
<br>
    zipWith :: (Word8 -&gt; Word8 -&gt; a) -&gt; ByteString -&gt; ByteString -&gt; [a]<br>
</blockquote>
<br>
Well, what if you wanted to zipWith a function of type &quot;Word8 -&gt; Word8 -&gt;<br>
Foo&quot; instead of &quot;Word8 -&gt; Word8 -&gt; Word8&quot;?<br>
</blockquote>
<br>
Then I would do what I do with map, and call `unpack` first.<br>
<br>
Either of the two options is usable:<br>
<br>
 map :: (Word8 -&gt; Word8) -&gt; ByteString -&gt; ByteString<br>
 zipWith :: (Word8 -&gt; Word8 -&gt; Word8) -&gt; ByteString -&gt; ByteString -&gt; ByteString<br>
   (or)<br>
 map :: (Word8 -&gt; a) -&gt; ByteString -&gt; [a]<br>
 zipWith :: (Word8 -&gt; Word8 -&gt; a) -&gt; ByteString -&gt; ByteString -&gt; [a]<br>
<br>
I just don&#39;t understand why we have one from each.<br>
<br>
-- <br>
Scott Lawrence<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a>Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</blockquote>
</div></div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>