 # Change Nickname

Current Nickname:
Search
v4.0
v4.0

# Between or Equal

## Expression, Operand

`<>` judges if a given `<value>` is in a closed interval between `<lower>` and `<upper>`, with `<value>` greater than or equal to `<lower>` but less than or equal to `<upper>`. It only makes sense when `<lower>` is less than or equal to `<upper>`.

Syntax:

• Expression: `<value>` <=> [`<lower>`, `<upper>`]
• Operand: ATTR (string, number, time)

## Constant

Example: judge if "abc" is in the closed interval ["asd", "1af"]

``````return "abc" <=> ["asd", "1af"]
``````

## Function

Example: judge if PI is in the closed interval [3.14, 3.15]

``````uncollect [3.14, 3.15] as a
with collect(a) as b
return pi() <=> [b, b]
``````

## Alias

Example: find 10 nodes whose levels are in the closed interval [1, 3]

``````find().nodes() as n
where n.level <=> [1, 3]
limit 10
return n{*}
``````

## Property

Example: find 10 nodes whose levels are in the closed interval [1, 3]

``````find().nodes({level <=> [1, 3]}) as n
limit 10
return n{*}
``````