Skip to main content

Boolean Implication

rascal-0.34.0

Synopsis

The implication operator on Boolean values.

Syntax

Exp₁ ==> Exp₂

Types

//

Exp₁Exp₂Exp₁ ==> Exp₂
boolboolbool

Description

The implication operator on Boolean values defined as follows:

Exp₁Exp₂Exp₁ ==> Exp₂
truetruetrue
truefalsefalse
falsetruetrue
falsefalsetrue

Boolean operators have short circuit semantics: only those operands are evaluated that are needed to compute the result. In the case of the ==> operator, the result is true if Exp₁ evaluates to false, otherwise Exp₂ is evaluated to determine the result.

Examples

rascal>false ==> true;
bool: true