How do you use Data.Text.intersperse :: Char -> Text -> Text?

David Feuer david.feuer at gmail.com
Sun Jun 27 19:06:09 UTC 2021


I have no idea whether that's useful at all. I added intersperse to
Data.Sequence because it has a really nice and efficient implementation in
terms of the Applicative instance for Seq. I have no idea if anyone uses it.

On Sat, Jun 26, 2021, 7:34 PM Andrew Lelechenko <andrew.lelechenko at gmail.com>
wrote:

> I know applications for `intercalate :: Text -> [Text] -> Text`:
> `unwords`, `unlines`, etc. But what is `intersperse :: Char -> Text ->
> Text` good for? Am I correct assuming that its sole merit is to mimic
> `Data.List` API? Note that `Data.List.intersperse` is polymorphic and is
> exceedingly rarely used for `Char -> String -> String`.
>
> Best regards,
> Andrew
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20210627/f3397db5/attachment.html>


More information about the Libraries mailing list