Haskell#concat Implementation Here's how I implemented concat - flattens a list of lists into just a list of elements.

concat' :: [[a]] -&gt; [a]
concat' ys = foldl (\acc x -&gt; acc ++ x) [] ys


Is it a problem that I'm using the ++ function? 

What's a better way to write this?
You could eta-contract the definition in two places: \acc x -&gt; acc ++ x is the eta-expanded version of (++) and concat' ys = (...) ys is the eta-expanded version of concat' = (...). So that would take you to:

concat' :: [[a]] -&gt; [a]
concat' = foldl (++) []


Now, in that case it turns out that it's better to use foldr rather than foldl and there is a good write-up about concat on the haskell wiki.