Filter usage in shapeless, Scala
问题 It is easy to filter HList in shapeless by type: val hlist = 1 :: 2 :: "3" :: true :: false :: HNil hlist.filter[Int] But how can I make my custom type filter? I want smth like that: for example I got list of some functions: def function1(s: String) = s.toInt def function2(s: String) = s.toDouble def function3(i: Int) = i.toDouble val hflist = function1 _ :: function3 _ :: function2 _ :: HNil hflist customFilter[String] //> function1 _ :: function2 _ :: HNil So after usage of this filter,