peatedValue: $0) }
// [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]</code></pre>

<p>In fact, <code>s.flatMap(transform)</code>  is equivalent to
<code>Array(s.map(transform).joined())</code>.</p>

<p><strong><code>transform</code>:</strong>  A closure that accepts an element of this
  sequence as its argument and returns a sequence or collection.
<strong>Returns:</strong> The resulting flattened array.</p>

<p><strong>Complexity:</strong> O(<em>m</em> + <em>n</em>), where <em>m</em> is the length of this sequence
  and <