chaining comparison

Syntax

<, <=, >, >=, ==, !=, and <> can be used together in one line.

Arguments

The arguments can be scalar/pair/vector/matrix/set. If one of the arguments is a pair/vector/matrix, the other is a scalar or a pair/vector/matrix of the same size.

Examples

$ 1<2<=3.5;
1

$ NULL<1<3>=2<3!=1>=NULL;
1

$ 1<3>1==2<3!=1;
0

$ 1 2 3 >=2 ==1 2 3;
[0,1,0]

$ 1 2 3 <= 3 2 2 > 2 1 2;
[1,1,0]