Evaluates a test expression, and if it is not nil, evaluates other expressions; repeats this process until the test expression evaluates to nil
(while testexpr [expr...])
while function continues until testexpr is nil.The
The expression containing the test condition.
nil.One or more expressions to be evaluated until testexpr is
The most recent value of the last expr.
some-func ten times, with test set to 1 through 10. It then returns 11, which is the value of the last expression evaluated:The following code calls user function
(setq test 1)
(while (<= test 10)
(setq test (1+ test))