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

scoder.Decode.scala Maven / Gradle / Ivy

The newest version!
package scoder

trait Decode[-F, +E, +T] {
  def apply(from: F): DecodeResult[E, T] = decode(from)
  def decode(from: F): DecodeResult[E, T]
}

object Decode {
  def apply[F, E, T](f: F => DecodeResult[E, T]): Decode[F, E, T] = new Decode[F, E, T] {
    override def decode(from: F): DecodeResult[E, T] = f(from)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy