[Haskell-cafe] ByteString intercalate semantics??

Galchin, Vasili vigalchin at gmail.com
Tue Jan 13 17:12:31 EST 2009


Hello,

     From Hoogle (my friend) .... *intercalate* ::
ByteString<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#t%3AByteString>->
[
ByteString<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#t%3AByteString>]
-> ByteString<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#t%3AByteString>
Source<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/src/Data-ByteString.html#intercalate>
*O(n)* The intercalate<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#v%3Aintercalate>function
takes a
ByteString<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#t%3AByteString>and
a list of
ByteString<http://hackage.haskell.org/packages/archive/bytestring/0.9.1.4/doc/html/Data-ByteString.html#t%3AByteString>s
and concatenates the list after interspersing the first argument between
each element of the list.



So intercalate doesn't do a simple concatenation?

Vasili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090113/3b106067/attachment.htm


More information about the Haskell-Cafe mailing list