Node LessThan
rascal-0.40.17
Synopsis
Less than operator on node values.
Syntax
Exp₁ < Exp₂
Types
Exp₁ | Exp₂ | Exp₁ < Exp₂ |
---|---|---|
node | node | bool |
Description
Comparison on nodes is defined by a lexicographic ordering. Node N = F(N₁, ..., Nₙ)
is less than node
N = G(M₁, ..., Mₘ)
when:
- N is not equal to M, and
- F is lexicographically less than G, or F is equal to G and
n < m
.
Examples
rascal>"f"(10, "abc") < "g"(3);
bool: true
rascal>"f"(10) < "f"(10, "abc");
bool: true