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

tofu.Void.scala Maven / Gradle / Ivy

There is a newer version: 0.13.6
Show newest version
package tofu

final abstract class Void {
  def absurd[A]: A
}

object Void {
  def fromNothing(n: Nothing): Void = n

  def mergeEither[A](x: Either[Void, A]): A = x match {
    case Left(value)  => value.absurd
    case Right(value) => value
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy