BooleanOps

final
class BooleanOps(self: Boolean)
class Object
trait Matchable
class Any

Type members

Classlikes

final
class Conditional[X](t: => X)
final
class ConditionalEither[A](a: => A)
sealed abstract
class GuardPrevent[M[_]]

Value members

Concrete methods

final
def !&&(q: => Boolean): Boolean

Negation of Conjunction. (NAND)

Negation of Conjunction. (NAND)

p q  p !&& q
0 0  1
0 1  1
1 0  1
1 1  0
final
def !?[A](a: => A)(implicit z: Monoid[A]): A

Returns the given argument if this is false, otherwise, the zero element for the type of the given argument.

Returns the given argument if this is false, otherwise, the zero element for the type of the given argument.

final
def !||(q: => Boolean): Boolean

Negation of Disjunction. (NOR)

Negation of Disjunction. (NOR)

p q  p !|| q
0 0  1
0 1  0
1 0  0
1 1  0
final
def -->(q: => Boolean): Boolean

Conditional.

Conditional.

p q  p --> q
0 0  1
0 1  1
1 0  0
1 1  1
final
def -/>(q: => Boolean): Boolean

Negation of Conditional.

Negation of Conditional.

p q  p -/> q
0 0  0
0 1  0
1 0  1
1 1  0
final
def /\(q: => Boolean): Boolean

Conjunction. (AND)

Conjunction. (AND)

p q  p /\ q
0 0  0
0 1  0
1 0  0
1 1  1
final
def <--(q: => Boolean): Boolean

Inverse Conditional.

Inverse Conditional.

p q  p <-- q
0 0  1
0 1  0
1 0  1
1 1  1
final
def <-->(q: => Boolean): Boolean

Bi-Conditional.

Bi-Conditional.

p q  p <--> q
0 0  1
0 1  0
1 0  0
1 1  1
final
def <\-(q: => Boolean): Boolean

Negation of Inverse Conditional.

Negation of Inverse Conditional.

p q  p ⇍ q
0 0  0
0 1  1
1 0  0
1 1  0
final
def ?[X](t: => X): Conditional[X]

Conditional operator that returns the first argument if this is true, the second argument otherwise.

Conditional operator that returns the first argument if this is true, the second argument otherwise.

final
def ??[A](a: => A)(implicit z: Monoid[A]): A

Returns the given argument if this is true, otherwise, the zero element for the type of the given argument.

Returns the given argument if this is true, otherwise, the zero element for the type of the given argument.

final
def \/(q: => Boolean): Boolean

Disjunction. (OR)

Disjunction. (OR)

p q  p \/ q
0 0  0
0 1  1
1 0  1
1 1  1
final
def conjunction: Boolean @@ Conjunction
final
def disjunction: Boolean @@ Disjunction
final
def either[A](a: => A): ConditionalEither[A]

Returns the first argument in \/- if this is true, otherwise the second argument in -\/.

Returns the first argument in \/- if this is true, otherwise the second argument in -\/.

final
def fold[A](t: => A, f: => A): A
Returns

t if true, f otherwise

final
def guard[M[_]]: GuardPrevent[M]
final
def lazyOption[A](a: => A): LazyOption[A]

Returns the given argument in LazySome if this is true, LazyNone otherwise.

Returns the given argument in LazySome if this is true, LazyNone otherwise.

final
def option[A](a: => A): Option[A]

Returns the given argument in Some if this is true, None otherwise.

Returns the given argument in Some if this is true, None otherwise.

final
def prevent[M[_]]: GuardPrevent[M]
final
def unless(f: => Unit): Unit

Executes the given side-effect if this boolean value is false.

Executes the given side-effect if this boolean value is false.

final
def unlessM[M[_] : Applicative, A](f: => M[A]): M[Unit]

Returns the given argument if cond is false, otherwise, unit lifted into M.

Returns the given argument if cond is false, otherwise, unit lifted into M.

final
def unlessMU[MA](f: => MA)(implicit M: Unapply[[F[_]] =>> Applicative[F], MA]): M[Unit]

A version of unlessM that infers the type constructor M.

A version of unlessM that infers the type constructor M.

final
def when(f: => Unit): Unit

Executes the given side-effect if this boolean value is true.

Executes the given side-effect if this boolean value is true.

final
def whenM[M[_] : Applicative, A](f: => M[A]): M[Unit]

Returns the given argument if cond is true, otherwise, unit lifted into M.

Returns the given argument if cond is true, otherwise, unit lifted into M.

final
def whenMU[MA](f: => MA)(implicit M: Unapply[[F[_]] =>> Applicative[F], MA]): M[Unit]

A version of whenM that infers the type constructor M.

A version of whenM that infers the type constructor M.

final
def |/\|: Boolean @@ Conjunction
final
def |\/|: Boolean @@ Disjunction
final
def |∧|: Boolean @@ Conjunction
final
def |∨|: Boolean @@ Disjunction
final
def (q: => Boolean): Boolean

Negation of Inverse Conditional.

Negation of Inverse Conditional.

p q  p <\- q
0 0  0
0 1  1
1 0  0
1 1  0
final
def (q: => Boolean): Boolean

Negation of Conditional.

Negation of Conditional.

p q  p ⇏ q
0 0  0
0 1  0
1 0  1
1 1  0
final
def (q: => Boolean): Boolean

Inverse Conditional.

Inverse Conditional.

p q  p ⇐ q
0 0  1
0 1  0
1 0  1
1 1  1
final
def (q: => Boolean): Boolean

Conjunction. (AND)

Conjunction. (AND)

p q  p ∧ q
0 0  0
0 1  0
1 0  0
1 1  1
final
def (q: => Boolean): Boolean

Disjunction. (OR)

Disjunction. (OR)

p q  p ∨ q
0 0  0
0 1  1
1 0  1
1 1  1