/usr/lib/s9fes/help/while is in scheme9 2010.11.13-2.
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 | S9 LIB (until <test-expression> <body>) ==> unspecific
(while <test-expression> <body>) ==> unspecific
(load-from-library "while.scm")
The WHILE form first evaluates <test-expression>. When it evaluates
to a true value, it also evaluates <body>, which is a sequence of
expressions. The expressions will be evaluated in order and then the
WHILE form will be re-entered by evaluating <test-expression> once
again. Then WHILE form terminates only if the test expression returns
#F. The value of he form is unspecific.
UNTIL is like WHILE, but evaluates its <body> until <test-expression>
evaluates to truth.
(let ((x 0)
(y 1))
(while (< x 10)
(set! y (* 2 y))
(set! x (+ 1 x)))
y) ==> 1024
|