


	</p>
<pre class="programlisting">
list&lt;int&gt; v(10);
for_each(v.begin(), v.end(), _1 = 1);</pre>
<p>

	The expression <code class="literal">_1 = 1</code> creates a lambda functor which assigns the value <code class="literal">1</code> to every element in <code class="literal">v</code>.<sup>[<a name="idp111020832" href="#ftn.idp111020832" class="footnote">3</a>]</sup>
      </p>
<p>
	Next, we create a container of pointers and make them point to the elements in the first container <code class="literal