Solution (source code)

= Solution

In the <type signature> `map :: (u -> v) -> [u] -> [v]`, the supplied <function> is `concat :: [[a]] -> [a]`. <Type inference> therefore identifies `u` with `[[a]]` and `v` with `[a]`. Consequently,

``
map concat :: [[[a]]] -> [[a]]
``

Thus $\boxed{[[[\alpha]]]\to[[\alpha]]}$ is the <principal type>. For example, `map concat [[[1],[2,3]],[[4],[]]]` gives `[[1,2,3],[4]]`: it concatenates each inner group, preserving the outermost grouping.