Skip to content

Instantly share code, notes, and snippets.

@joan38
Created August 26, 2018 22:03
Show Gist options
  • Select an option

  • Save joan38/fb204c0c8b0d7b94ce4c984cf3a6d060 to your computer and use it in GitHub Desktop.

Select an option

Save joan38/fb204c0c8b0d7b94ce4c984cf3a6d060 to your computer and use it in GitHub Desktop.
trait Encoder[T] {
def apply(o: T): String
}
object Encoder {
implicit val intEncoder: Encoder[Int] = _.toString
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment