user-defined types only contain read-only, immutable fields are treated as immutable type.
immutable type is used in map key, sort method, indexOf method.
typedef Interval($b : Int, $e : Int) {
let begin = $b
let end = $e
}
var map = [new Interval(0,2) : 2]
[new Interval(0,1), new Interval(2,3), new Interval(-1,9)].sort()
also implicitly define relative operators such as <, <=, >, >=, ==, !=
user-defined types only contain read-only, immutable fields are treated as immutable type. immutable type is used in map key, sort method, indexOf method.
also implicitly define relative operators such as
<
,<=
,>
,>=
,==
,!=