4 Program Control
|Repeatedly executes a body until a test expression is false.||386|
|Repeatedly executes a body until a test expression is true.||386|
|Performs general iteration over a body, updating bindings and performing end tests on each iteration.||387|
The following example uses tail recursion to compute the name of the root volume on which a given file system object is stored.
define method root-volume-name (f :: <file-or-directory>) if ( root-volume?(f) ) f.name else root-volume-name(f.container) end if; end method;The example above can execute with constant stack size, regardless of how deeply nested the file system hierarchy may be.
Generated with Harlequin WebMaker