Given an arbitrary tuple, I want to extract a subset of the tuple. The signature would look something like:
def subset[T1 <: Tuple, T2 <: Tuple](t:T1): T2 = ???
where T2 is a tuple with some subset of members chosen from T1.
Using it would look something like
subset[(String, Int, Boolean), (String, Boolean)]( ("str", 42, true) ) == ("str", true)
I understand that this requires extensive use of match types and typelevel programming. I feel like it be pretty straight forward with Shapeless but I'm missing some functionality from the std lib on tuples vs HLIST.