title: Is there a function in Rust equivalent to Java's Stream.Iterate?
body: <p>Does the Rust standard library have a function that generates an infinite iterator given a seed and a lambda, as the Java 8 Streams provide? If not, what is a similar alternative in Rust?</p>
  
  <pre><code>Stream.iterate(1, x -&gt; 2 * x);
  </code></pre>