BooleanOps

final
class BooleanOps(self: Boolean) extends AnyVal
class AnyVal
trait Matchable
class Any

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 ??[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
final
final
def fold[A](t: => A, f: => A): A
Returns

t if true, f otherwise

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 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 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