Skip to content

Instantly share code, notes, and snippets.

@milessabin
Created October 12, 2012 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milessabin/3880993 to your computer and use it in GitHub Desktop.
Save milessabin/3880993 to your computer and use it in GitHub Desktop.
Poly1 examples
object grow extends Poly1 {
implicit def casePuppy = at[Puppy](_.grow)
implicit def caseKitten = at[Cat](_.grow)
}
val y = Puppy() :: Kitten() :: HNil
val a = y map grow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment