Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created August 13, 2014 18:07
Show Gist options
  • Save djspiewak/f3553cd5eb5d79885c34 to your computer and use it in GitHub Desktop.
Save djspiewak/f3553cd5eb5d79885c34 to your computer and use it in GitHub Desktop.
implicit class ListCodec[L <: HList](self: Codec[L]) {
def pmap[L2 <: HList](p: Poly)(implicit m: Mapper.Aux[p.type, L, L2], m2: Mapper.Aux[p.type, L2, L]): Codec[L2] =
self.xmap({ _ map p }, { _ map p })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment