[Haskell-cafe] Please tell me this function exists

Max Rabkin max.rabkin at gmail.com
Wed Dec 17 13:39:59 EST 2008


Hoogle is your friend:

Searching for String -> [String] -> String
Data.List	intercalate :: [a] -> [[a]] -> [a]
base	
intercalate xs xss is equivalent to (concat (intersperse xs xss)). It
inserts the...

Regards,
Max

On Wed, Dec 17, 2008 at 10:36 AM, Brian Hurt <bhurt at spnz.org> wrote:
>
> I know it's not hard to write, but still:
>
> concat :: String -> [String] -> String
> concat _ [] = ""
> concat _ [x] = x
> concat sep x:xs = x ++ sep ++ (concat sep xs)
>
> I've got to be stupid and missing it in the standard libraries.  Please tell
> me where.  Thanks.
>
> Brian
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list