Shapeless map HList depending on target types
问题 I have the following problem, I want to map items of an HList to another HList but Strings in the source HList should only be converted to URL if the "target" type is URL. val name = "Stackoverflow" val url = "https://stackoverflow.com/q" val list = name :: url :: HNil val mapped: String :: URL :: HNil = list.map(???) As far as my research took me is that all the Poly stuff only cares about the input type but not about the output type. So are there ways to archive my goal ? 回答1: I don't think