pub fn iterate_with_condition<F, T>(&self, constructor: F) -> Result<T, SchedulerError>
    where
        F: FnOnce(&mut Circuit<Self>) -> Result<(Condition<Circuit<Self>>, T), SchedulerError>,
    {
        self.iterate(|child| {
            let (condition, res) = constructor(child)?;
            Ok((move || condition.check(), res))
        })
    }
/// Create a subcircuit that iterates until a condition is satisfied.
///
/// This method is similar to [`Circuit::iterate`], which creates
/// a subcircuit that iterates until a specified condition is
/// satisfied, but here the condition is a predicate over the
/// contents of a stream captured by a [`Condition`].
///
/// The `constructor` closure populates the child circuit and returns
/// a condition that will be evaluated to check the termination
/// condition on each iteration and an arbitrary user-defined return
/// value that typically contains output streams of the child.
/// The subcircuit will iterate until the condition returns true.
Create a subcircuit that iterates until a condition is satisfied.
This method is similar to [`Circuit::iterate`], which creates
a subcircuit that iterates until a specified condition is
satisfied, but here the condition is a predicate over the
contents of a stream captured by a [`Condition`].

The `constructor` closure populates the child circuit and returns
a condition that will be evaluated to check the termination
condition on each iteration and an arbitrary user-defined return
value that typically contains output streams of the child.
The subcircuit will iterate until the condition returns true.
Create a subcircuit that iterates until a condition is satisfied . This method is similar to [ ` Circuit :: iterate ` ] which creates a subcircuit that iterates until a specified condition is satisfied but here the condition is a predicate over the contents of a stream captured by a [ ` Condition ` ] . The ` constructor ` closure populates the child circuit and returns a condition that will be evaluated to check the termination condition on each iteration and an arbitrary user - defined return value that typically contains output streams of the child . The subcircuit will iterate until the condition returns true .
pub fn iterate_with_condition<F, T>(&self, constructor: F) -> Result<T, SchedulerError>
    where
        F: FnOnce(&mut Circuit<Self>) -> Result<(Condition<Circuit<Self>>, T), SchedulerError>,
    {
        self.iterate(|child| {
            let (condition, res) = constructor(child)?;
            Ok((move || condition.check(), res))
        })
    }
pub fn iterate_with_condition < F , T > ( & self , constructor : F ) -> Result < T , SchedulerError > where F : FnOnce ( & mut Circuit < Self > ) -> Result < ( Condition < Circuit < Self > > , T ) , SchedulerError > , { self . iterate ( | child | { let ( condition , res ) = constructor ( child ) ? ; Ok ( ( move | | condition . check ( ) , res ) ) } ) }
Create a subcircuit that iterates until a condition is satisfied.
Create a subcircuit that iterates until a condition is satisfied .
&self
constructor
F