Imperative While Loop Syntax

I’m pushing forward into the fog of Loops (please don’t laugh too much). I’m attempting a simple loop that trims a single tier list of curves by a consistent start and end parameter. Here is the code block below:

Any help is welcome.
def curves.trim(curves)

trims = {};

c = curves;

i = 0;

cnt = List.Count©;

return = [Imperative]
while (i<cnt)


trims[i] = trim;

i = i + 1;

return = trims;


Hi Nick,

There’s a few minor things to note with your code:





Tho I’m not sure if “ParameterTrim” is a good representation of what imperative while loops should be used for. Good luck!


It worked! I know this wasn’t a great example of a while loop scenario, I just needed something simple to complete one. Thank you!