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

Andrew Lelechenko andrew.lelechenko at
Sat Jun 26 23:33:47 UTC 2021

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,

More information about the Libraries mailing list