Skip to content

Instantly share code, notes, and snippets.

Avatar

Seth Tisue SethTisue

View GitHub Profile
@pedrofurla
pedrofurla / gist:9917123
Created Apr 1, 2014
HList map doesn't like defaults...
View gist:9917123
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
You can’t perform that action at this time.