How to flatten a nested tuple?

flatten, scala, tuples

Solution

If you use shapeless, this is exactly what you need, I think.

Problem

I have a nested tuple structure like `(String,(String,Double))` and I want to transform it to `(String,String,Double)`. I have various kinds of nested tuple, and I don't want to transform each manually. Is there any convenient way to do that?

Original source