/usr/share/hol88-2.02.19940316/help/ENTRIES/do.doc is in hol88-help 2.02.19940316-35.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | \DOC do
\TYPE {$do : (* -> void)}
\SYNOPSIS
Evaluates an expression for its side-effects.
\DESCRIBE
The function {do} evaluates its argument (presumably for its side-effects)
and returns the value {(): void}.
\FAILURE
Fails iff the evaluation of its argument fails.
\EXAMPLE
The following shows how an assignment can be evaluated for its
side-effects:
{
#letref x = 1;;
x = 1 : int
#x := x + 1;;
2 : int
#do (x := x + 1);;
() : void
#x := x + 1;;
4 : int
}
\COMMENTS
The use of {do} as if it were a normal ML function should not be confused with
its role as a syntactic construct in a while loop. For example, following on
from the above example, consider the following:
{
#while x > 0 do do (x := x - 1);;
() : void
#x;;
0 : int
}
\noindent In the above, the first {do} is part of the {while} loop, whereas the
second is function-like.
\ENDDOC
|