Rewrite intercalate to not use fusion.
--HG--
extra : convert_revision : 504f8543ebff99f83ad9cbbd12106e051bc0eeb5
commitc44ba7a7cc4447dbd7af574e52bd455a2d00b8d9
authorBryan O'Sullivan <bos@serpentine.com>
dateMon 30 Nov 2009, 06:51 (17 years ago)
parent2a9d765
Data/Text.hs+1−1
@@ -393,7 +393,7 @@ map f t = unstream (S.map f (stream t))
393393-- 'Text's and concatenates the list after interspersing the first
394394-- argument between each element of the list.
395395intercalate :: Text -> [Text] -> Text
396−intercalate t ts = unstream (S.intercalate (stream t) (L.map stream ts))
396+intercalate t = concat . (L.intersperse t)
397397{-# INLINE intercalate #-}
398398
399399-- | /O(n)/ The 'intersperse' function takes a character and places it