I encountered the following code :<br><br>-- B == Data.ByteString ; L == Data.ByteString.Lazy<br>contents&#39; = B.intercalate B.empty $ L.toChunks contents<br><br>with a previously unencountered function intercalate. A quick google query later i knew that it&#39;s just intersperse &amp; concat nicely bundled and started wondering why anybody would do this, as simple <br>
<br>contents&#39; = B.concat $ L.toChunks contents<br><br>would do (probably nearly) the same. The only thing I am able to come up with is that it somehow helps streamline the memory usage (if it has some meaning).<br><br>
Is there some reason to use intercalate &lt;empty&gt; &lt;list&gt; instead of concat &lt;list&gt; (probably when dealing with non-lazy bytestrings) ?<br><br>Thx, wman.<br>