Skip to content

Instantly share code, notes, and snippets.

View SethTisue's full-sized avatar

Seth Tisue SethTisue

View GitHub Profile
@pedrofurla
pedrofurla / gist:9917123
Created April 1, 2014 15:59
HList map doesn't like defaults...
scala> val sample = "A" :: 1 :: 2L :: HNil
sample: shapeless.::[String,shapeless.::[Int,shapeless.::[Long,shapeless.HNil]]] = A :: 1 :: 2 :: HNil
scala> object bleh4 extends Poly1 {
| implicit val caseInt = at[Int](_.toString);
| implicit val caseLong = at[Long](_.toString);
| implicit val caseStr = at[String](_.toString);
| }
defined module bleh4