pub fn feedback<T>(initial: T) -> Feedback<T>
    where T: Copy
{
    Feedback {
        t: Cell::new(Some(initial)),
    }
}
/**
 * Feed the output of an iterator pipeline back to the input. Feedback
 * is delayed by one timestep to preserve causality, so the first input
 * is provided by `initial`, and the output of that pass is used as the
 * input for the second pass, and so on.
 *
 * Every time the input is requested, it yields the last result returned
 * by the pipeline. The pipeline can request the feedback value any
 * number of times per cycle, including ignoring it entirely. If the
 * pipeline doesn't request a particular input, that input is discarded,
 * not saved for the next cycle. If the pipeline requests an input
 * multiple times in the process of producing an output, the same input
 * will be returned each time.
 *
 * ```rust
 * use itertools_wild::special::feedback;
 *
 * let input = [1, -2, 3, -4, 5];
 * let result: Vec<i32> = feedback(0).feed(|feedback|
 *         feedback.zip(&input)
 *                 .map(|(a, b)| a + b)
 *     ).collect();
 * assert_eq!(result, &[0, 1, -1, 2, -2, 3]);
 * ```
 */
Feed the output of an iterator pipeline back to the input. Feedback
is delayed by one timestep to preserve causality, so the first input
is provided by `initial`, and the output of that pass is used as the
input for the second pass, and so on.

Every time the input is requested, it yields the last result returned
by the pipeline. The pipeline can request the feedback value any
number of times per cycle, including ignoring it entirely. If the
pipeline doesn't request a particular input, that input is discarded,
not saved for the next cycle. If the pipeline requests an input
multiple times in the process of producing an output, the same input
will be returned each time.




Feed the output of an iterator pipeline back to the input . Feedback is delayed by one timestep to preserve causality so the first input is provided by ` initial ` and the output of that pass is used as the input for the second pass and so on . Every time the input is requested it yields the last result returned by the pipeline . The pipeline can request the feedback value any number of times per cycle including ignoring it entirely . If the pipeline doesn ' t request a particular input that input is discarded not saved for the next cycle . If the pipeline requests an input multiple times in the process of producing an output the same input will be returned each time .
pub fn feedback<T>(initial: T) -> Feedback<T>
    where T: Copy
{
    Feedback {
        t: Cell::new(Some(initial)),
    }
}
pub fn feedback < T > ( initial : T ) -> Feedback < T > where T : Copy { Feedback { t : Cell :: new ( Some ( initial ) ) , } }
Feed the output of an iterator pipeline back to the input.
Feed the output of an iterator pipeline back to the input .
initial
T
initial
T