
tofu.Void.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tofu-kernel_3 Show documentation
Show all versions of tofu-kernel_3 Show documentation
Opinionated set of tools for functional programming in Scala
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