Description Usage Arguments Details
This function executes test_expr to determine whether to enter a while loop. In the while loop, the control flow is as follows: sleep(sleep_before), thing_expr(), sleep(sleep_after).
1 2 | loop_test(test_expr, test_fcn, thing_expr, n_lim = 15,
warning_text = "", sleep_before = 0, sleep_after = 0)
|
test_expr |
a parameterless function that will be executed to determine while loop control flow |
test_fcn |
a function to evaluate the value of test_expr, with one parameter |
thing_expr |
the main task that must be completed by the end of the loop (no parameters) |
n_lim |
maximum number of iterations |
warning_text |
warning to print if iteration limit is reached |
sleep_before |
time to sleep before evaluating thing_expr |
sleep_after |
time to sleep after evaluating thing_expr and before evaluating test_expr at the end of the while loop |
The while loop will exit if test_fcn(test_expr) is false or if the number of iterations exceeds n_lim.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.