Generic Poly2 Folder case for shapeless Hlist
问题 I am trying to transform the following HList Some(C(15)) :: None :: Some(B(55)) :: None :: Some(A(195)) :: HNil to C(15) :: B(55) :: A(195) :: HNil Here is what I have at the moment : import shapeless._ case class A(value: Int) case class B(value: Int) case class C(value: Int) trait folderLP extends Poly2 { implicit def default[T, L <: HList] = at[T, L]((acc, t) => acc) } object folder extends folderLP { implicit def none[T, L <: HList] = at[None.type, L]((t, acc) => acc) implicit def