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

com.mchange.conveniences.boolean.core.scala Maven / Gradle / Ivy

The newest version!
package com.mchange.conveniences.boolean

val UnitOption : Option[Unit] = Some( () )

extension ( b : Boolean )
  def toOption : Option[Unit] = if b then UnitOption else None
  def tf[A]( ifTrue : =>A)( ifFalse : =>A ) = if b then ifTrue else ifFalse





© 2015 - 2024 Weber Informatics LLC | Privacy Policy