How would I go about doing a while statement in Dynamo?

So I have a list of xyz coordinates (named l) as shown below:

Capture

So I want to run this while statement (C++ format) in dynamo but I can’t figure out how.

Firstly, I don’t understand the whole [Imperative] thing, and even if I do, the action of placing a receptacle feels like it needs to be done using a node rather than in a code block.

Secondly, I can’t figure out how to do a while statement in Dynamo. The description it gives isn’t enough and I can’t find any help online.

Any suggestions?

code

Did you look over the design script language manual (check section 12 closely):

http://dynamobim.org/wp-content/uploads/forum-assets/colin-mccroneautodesk-com/07/10/Dynamo_language_guide_version_1.pdf