logoalt Hacker News

waleedlatif1yesterday at 7:57 PM0 repliesview on HN

for loops we use two sentinel nodes with a backwards edge, and before each iteration, we check the condition and update loop variables.

  sentinel -> body -> sentinel (condition with backwards edge to first sentinel)
in the UI, this is just represented as another block, and depending on the varying types of loops you can either define a collection or the number of iterations