intersperse package:rio

O(n) The intersperse function takes a Word8 and a ByteString and `intersperses' that byte between the elements of the ByteString. It is analogous to the intersperse function on Lists.
The intersperse function takes a Word8 and a ByteString and `intersperses' that byte between the elements of the ByteString. It is analogous to the intersperse function on Lists.
The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,
>>> intersperse ',' "abcde"
"a,b,c,d,e"
'intersperse x xs' alternates elements of the list with copies of x.
intersperse 0 (1 :| [2,3]) == 1 :| [0,2,0,3]
Intersperse an element between the elements of a sequence.
intersperse a empty = empty
intersperse a (singleton x) = singleton x
intersperse a (fromList [x,y]) = fromList [x,a,y]
intersperse a (fromList [x,y,z]) = fromList [x,a,y,a,z]
O(n) The intersperse function takes a character and places it between the characters of a Text. Example:
>>> T.intersperse '.' "SHIELD"
"S.H.I.E.L.D"
Subject to fusion. Performs replacement on invalid scalar values.
O(n) The intersperse function takes a character and places it between the characters of a Text. Subject to fusion. Performs replacement on invalid scalar values.