[Haskell-cafe] Foldable intercalate for Data.Text?

Benjamin Redelings benjamin.redelings at gmail.com
Sat Jan 21 19:11:22 UTC 2023


Hi,

I was looking at intercalate in Data.Text, and I see that the signature is

     Text -> [Text] -> Text.

I'm curious why this isn't (say)

     Foldable f => Text -> f Text -> Text

Perhaps because this would be harder to optimize?

-BenRI


More information about the Haskell-Cafe mailing list