  println!(&quot;calculating slowly...&quot;);
    thread::sleep(Duration::from_secs(2));
    num
};
<span class="boring">expensive_closure(5);
</span><span class="boring">}</span></code></pre></pre>
<!--
<span class="caption">Listing 13-5: Defining a closure and storing it in the
`expensive_closure` variable</span>
-->
<p><span class="caption">リスト13-5: クロージャを定義し、<code>expensive_closure</code>変数に保存する</span></p>
<!--
The closure definition comes after the `=` to assign