That can still be done without a GC, e.g. the following is sketch of lazy evaluation in Rust:<p><pre><code>  use std::mem;
  
  enum Lazy&lt;T&gt; {
      Thunk(Box&lt;Fn() -&gt; T&gt;),
      EvalInProgress,
      Forced(T),
  }
  
  impl&lt;T&gt; Lazy&lt;T&gt; {
      fn new&lt;F: &#x27;static + Fn() -&gt; T&gt;(f: F) -&gt; Lazy&lt;T&gt; {
          Lazy::Thunk(Box::new(f))
      }
  
      fn force(&amp;mut self) {
           *self = match mem::replace(self, Lazy::EvalInProgress) {
               Lazy::Thunk(f) =&gt; Lazy::Forced(f()),
               Lazy::EvalInProgress =&gt; panic!(&quot;forcing while evaluating&quot;),
               Lazy::Forced(x) =&gt; Lazy::Forced(x),
           }
      }
  
      fn get(&amp;mut self) -&gt; &amp;mut T {
          self.force();
          match *self {
              Lazy::Thunk(_) | Lazy::EvalInProgress =&gt; unreachable!(),
              Lazy::Forced(ref mut x) =&gt; x,
          }
      }
  }
  
  fn main() {
      let mut lazy = Lazy::new(|| {
          println!(&quot;evaluating&quot;);
          10
      });
      
      println!(&quot;first: {}&quot;, lazy.get());
      println!(&quot;second: {}&quot;, lazy.get());
  }
</code></pre>
Output:<p><pre><code>  evaluating
  first: 10
  second: 10
</code></pre>
(There&#x27;s a pile of tweaks&#x2F;optimisations that can be made, like making `force` truly a no-op for values that have already been forced and removing the need for the lazy object to be mutable, but the above demonstrates the core idea.)