Commits

Bryan O'Sullivan committed 50e1aea

Fix up lazy intercalate.

  • Participants
  • Parent commits c3799e9

Comments (0)

Files changed (1)

Data/Text/Lazy.hs

 -- 'Text's and concatenates the list after interspersing the first
 -- argument between each element of the list.
 intercalate :: Text -> [Text] -> Text
-intercalate t ts = unstream (S.intercalate (stream t) (L.map stream ts))
+intercalate t = concat . (L.intersperse t)
 {-# INLINE intercalate #-}
 
 -- | /O(n)/ The 'intersperse' function takes a character and places it