Functions Documentation | |
Name | enumWhile |
Syntax | (enumWhile list condition itemVar exp) -> value of last expression |
Argument List | list: A list of elements you want to walk through. condition: Stops enum if condition is Nil. itemVar: Name of the variable that will be used to hold the current element you are at in the enum. Does not need to be defined beforehand. exp: The expression you want to evaluate for each element in the list. The element will be available inside the expression under the name you used in `itemVar'. |
Returns | Whatever the last expression evaluated inside returns. |
Category | list, iteration |
Description | A function allowing you to evaluate an expression using the variable to store the element you are at for every element in a list unless condition is Nil. |
Example |
(block (condition) (setq condition True) (enumwhile '(a b c d) condition theElement (block Nil (if (eq theElement 'b) (setq condition Nil)) (dbgOutput theElement) ) ) ) This will display on the debug console. a b True |
Comment | Basically a enum with an if inside of it. |
19 visitors online |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Guest |
Mod of the Month (March '24) |
Featured Mods (random) |
Northwind Equipment Pack for 1.0 |
"PDmod" ICX Overhaul |
Quality Mods (random) |
Starlight-class cruiser |
Stellar cartography |
Balanced Mods (random) |
Northwind Devices for Transcendence 1.1 beta (1.08b minimum) |
Agauptera-class yacht |