Frank A. Christoph writes:
> 
> 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).

Try function "intersperse" from the Haskell 98 List Library 
(Sec. 7.3, p. 29 of the Library Report).


Martin



Reply via email to