- Shang provides the c-style operators ++, -, +=, -=, *=, /=.
- The percent sign % is used as the mod operator.
- # is the operator for list indexing: x # 3 is the third element of
list x.
- @ is the operator for retrieving a value from a hash table:
x @ "fred" is the value in x associated with key
"fred".
- in is the operator for testing set membership: x in S is true
if x is a member of set S.
- to is the operator for creating an interval: 0 to 10 is the
closed interval [0, 10].
oz
2009-12-22