Skip to content

Commit

Permalink
Say a bit more about iteration
Browse files Browse the repository at this point in the history
Fixes #66.
  • Loading branch information
annevk authored and domenic committed Mar 23, 2017
1 parent 30d99d6 commit a21296b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions infra.bs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,31 @@ will make the caller automatically rethrow the given value, if any, and thereby
caller's algorithm. Using prose the caller has the ability to "catch" the exception and perform
another action.

<h4 id=algorithm-iteration>Iteration</h4>

<p>There's a variety of ways to repeat a set of steps until a condition is reached.

<p class=note>The Infra Standard is not (yet) exhaustive on this; please file an issue if you need
something.

<dl>
<dt>For each
<dd><p>As defined <a for=list lt="for each">for lists</a> (and derivatives) and
<a for=map lt="for each">maps</a>.

<dt><dfn export for=iteration lt=while>While</dfn>
<dd>
<p>An instruction to repeat a set of steps as long as a condition is met.

<div class=example id=example-while>
<p>While |condition| is "<code>met</code>":

<ol>
<li><p>&hellip;
</ol>
</div>
</dl>

<p>An iteration's flow can be controlled via requirements to
<dfn export for=iteration>continue</dfn> or <dfn export for=iteration>break</dfn>.
<a for=iteration>Continue</a> will skip over any remaining steps in an iteration, proceeding to the
Expand Down

0 comments on commit a21296b

Please sign in to comment.