|
StdLabels.String provides a function sub with the following
type:
|
pos and len, respectively.
A call to this function can be written
|
|
~ and :, so as to
distinguish them from variables.StdLabels redefines some modules of the standard library with
labeled versions of some functions. Thus, one can include the command
|
String.sub could have been used as a short
hand for StdLabels.String.sub in the example above.substring could have been defined as
|
: mark
at the end of the label and the variable are omitted. Hence, the following
definition of substring is equivalent to the previous one.
|