All Downloads are FREE. Search and download functionalities are using the official Maven repository.

csvside.CellWriter.scala Maven / Gradle / Ivy

package csvside

trait CellWriter[-A] extends (A => String) {
  def contramap[B](func: B => A): CellWriter[B] =
    CellWriter[B](value => this(func(value)))
}

object CellWriter {
  def apply[A](func: A => String): CellWriter[A] =
    new CellWriter[A] {
      def apply(value: A): String = func(value)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy