"Frank A. Christoph" wrote:
> I have a humble wish for the Wish List.
>
> I wish this function was in the Prelude or standard library:
>
> concatSep :: [a] -> [[a]] -> [a]
>
> with semantics
>
> concatSep _ [] = []
> concatSep _ [xs] = [xs]
> concatSep sep (xs:xss) = xs ++ sep ++ concatSep sep xss
>
> I use it all the time. Unfortunately, it doesn't even appear in GHC's
> non-standard libraries (although there is an analogue in Pretty).
It's not there, but almost:
concatSep s = concat . intersperse s
I use it a lot too.
--
-- Lennart