[Haskell-cafe] Please tell me this function exists

Bas van Dijk v.dijk.bas at gmail.com
Wed Dec 17 13:40:37 EST 2008


On Wed, Dec 17, 2008 at 7:36 PM, 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.

Just hoogle the type:

http://haskell.org/hoogle/?hoogle=String+-%3E+[String]+-%3E+String

and see the first hit.

regards,

Bas


More information about the Haskell-Cafe mailing list