The following gives a simple-minded way of calculating the largest integer
on the machine.
- fun incr x = x+1;
> val incr = fn : int -> int
val maxint = repeat incr 0; (* takes some time *)
> val maxint = 1073741823 : int
(Caution: in some ML implementations, the type int is
not implemented by machine words, but by ‘bignum’ techniques that
allow numbers of arbitrary size, in which case the example above
will not return for a very long time.)