Is it possible to pass an HList as a function parameter?
This is what I have so far:
import shapeless._
import poly._
object id extends (Id ~> Id) {
def apply[T](f: shapeless.Id[T]): shapeless.Id[T] = f
}
object ListHandler {
def mapOverHlist[ListType <: HList](list: ListType) = list.map(id)
}
val x = "foo" :: "bar" :: 0xb33f :: HNil
ListHandler.mapOverHlist(x)
Leads to this error:
could not find implicit value for parameter mapper:
shapeless.ops.hlist.Mapper[ShapelessSpec.this.id.type,ListType]