Seddryck/NBi

Create a sequence with an iteration function

Opened this issue · 0 comments

It would be helpful to be able to define a sequence with the help of an initial value, an iteration function defining the next value but also a boolean function defining if we need to continue the iteration. Typically we have a function f(x) = (y,boolean).

<loop-sentinel seed="1">
   <next-value  language="c-sharp">x + Random.Next()/10 </next-value>
   <condition language="c-sharp">Math.Pow(x,2) &lt; 1200</condition>
</loop>