Skip to content

Instantly share code, notes, and snippets.

trait StringWrites[-A] {
def writes(o: A): String
}
object StringWrites {
def apply[A](f: A => String): StringWrites[A] = new StringWrites[A] {
def writes(a: A): String = f(a)
}
}