|
|
one
is bound to a variant that is an
integer value tagged with `Int
. The >
sign
in the type [> `Int of int]
means
that one
can actually be a assigned a super type. That is,
values of this type can actually have another tag. However, if they have
have tag `Int
then they must carry integers.
Thus, both one
and half
have compatible types and
can be stored in the same collection:
|
collection
is a list of values, that can be integers
tagged with `Int
or floating point values tagged with `Float
, or
values with another tag.
|
|
|
|
|
point1
.
|
|
|
|
|