It does not work though, since at the point where you will use it (flatten), the bound of the type parameter will not be known and will fail.