Hi Eli,
Good to see you on the Shapeless mailing list :)
I added a `map` function to NatTRel a couple of weeks ago. It allows
you to apply a natural transformation over a HList with a common type
constructor:
https://github.com/milessabin/shapeless/blob/master/core/src/main/scala/shapeless/hlist.scala#L543
Its use is something like so:
import shapeless._
object setToList extends (Set ~> List) {
def apply[A](a: Set[A]): List[A] = a.toList
}
def mapSetToList[In <: HList, Out <: HList](xs: In)(implicit
nattrel: NatTRel[In, Set, Out, List]): Out =
nattrel.map(setToList, xs)
val x = Set(1, 2, 3) :: Set("Hello", "World") :: Set(true) :: HNil
mapSetToList(x)
Now, since you're saying that it takes an outside parameter, I'm not
sure if that's going to make sense with a natural transformation... Is
this similar to what you're trying to do with a KList?
Thanks,
Brian
> --
> You received this message because you are subscribed to the Google Groups
> "Shapeless Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
shapeless-de...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>