The thing is, joined also works on arrays-of-arrays today. The only difference is that flatten doesn&#39;t have a separator.<br><br>We wouldn&#39;t lose what your example shows — you could do this:<br><br>[[&quot;hey&quot;], [&quot;what&quot;]].joined().joined(separator: “&quot;)<br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 24, 2016 at 5:45 PM Jose Cheyo Jimenez &lt;<a href="mailto:cheyo@masters3d.com">cheyo@masters3d.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Here is a quick example that we would loose.</div><div><br></div><div>[[&quot;hey&quot;], [&quot;what&quot;]].flatten().joined(separator: “&quot;)</div><div><br></div><div>[[&quot;hey&quot;], [&quot;what&quot;]].flatten() //  [&quot;hey&quot;, &quot;what”]</div><div><br></div><div><div>The way I think of it is flatten works on array of arrays while joined works on arrays of strings. </div></div><div><br></div><div>I guess we could do this too</div><div><br></div><div>[[&quot;hey&quot;], [&quot;what&quot;]].joined(separator: []).joined(separator: &quot;&quot;)<br><br></div></div><div style="word-wrap:break-word"><div><br></div><br><div><blockquote type="cite"><div>On Jul 24, 2016, at 5:29 PM, Jose Cheyo Jimenez &lt;<a href="mailto:cheyo@masters3d.com" target="_blank">cheyo@masters3d.com</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div>-1 for this. To me there needs to be a difference between String (which is not a normal collection) and other regular collections. </div><div><br></div><div>In addition, I really don’t think this proposal has the needed strong support for the change. </div><div><br></div><div><br><div><br></div><div><br><div><blockquote type="cite"><div>On Jul 22, 2016, at 3:41 PM, Jacob Bandes-Storch via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Here&#39;s a proposal draft. Comments welcome:<div><br></div><div><a href="https://gist.github.com/jtbandes/7978dc1848f7c37eeaa8e9aba27c7325" target="_blank">https://gist.github.com/jtbandes/7978dc1848f7c37eeaa8e9aba27c7325</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 22, 2016 at 2:51 PM, Ben Rimmington<span> </span><span dir="ltr">&lt;<a href="mailto:me@benrimmington.com" target="_blank">me@benrimmington.com</a>&gt;</span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>&gt; On 22 Jul 2016, at 20:43, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com" target="_blank">jtbandes@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt; On Fri, Jul 22, 2016 at 8:35 AM, Ben Rimmington &lt;<a href="mailto:me@benrimmington.com" target="_blank">me@benrimmington.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;&gt; On 22 Jul 2016, at 02:46, Jacob Bandes-Storch wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; In the swift-lang Slack channel, a few of us were discussing joined(separator:) and realized that flatten() does almost exactly the same thing.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Is there interest in renaming flatten() to joined()?  Since joined takes a separator that&#39;s any Sequence, we can&#39;t have a default value for the separator parameter, but we can have a variant of joined() with no arguments.<br>&gt;&gt;<br>&gt;&gt; I&#39;d like default separators for the joined() methods.<br>&gt;&gt;<br>&gt;&gt; &lt;<a href="https://bugs.swift.org/browse/SR-1428" rel="noreferrer" target="_blank">https://bugs.swift.org/browse/SR-1428</a>&gt;<br>&gt;&gt;<br>&gt;&gt; But renaming flatten() to joined() seems complicated.<br>&gt;&gt;<br>&gt;&gt; &lt;<a href="https://github.com/apple/swift/blob/master/stdlib/public/core/Flatten.swift.gyb" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/stdlib/public/core/Flatten.swift.gyb</a>&gt;<br>&gt;&gt; &lt;<a href="https://github.com/apple/swift/blob/master/stdlib/public/core/Join.swift" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/stdlib/public/core/Join.swift</a>&gt;<br>&gt;<br>&gt; What makes it seem complicated? At the very least, one could just rename the flatten() function. There might also be an opportunity to combine the two files and delete some code from stdlib.<br><br></span>There&#39;s only one joined() method (for a sequence of sequences):<br><br>       <span> </span>extension Sequence {<br>         <span> </span>func joined&lt;Separator: Sequence&gt;(separator: Separator) -&gt; JoinedSequence&lt;Self&gt;<br>       <span> </span>}<br><br>There are many flatten() methods (`where` clauses omitted for brevity):<br><br>       <span> </span>extension Sequence {<br>         <span> </span>func flatten() -&gt; FlattenSequence&lt;Self&gt;<br>       <span> </span>}<br><br>       <span> </span>extension LazySequenceProtocol {<br>         <span> </span>func flatten() -&gt; LazySequence&lt;FlattenSequence&lt;Self.Elements&gt;&gt;<br>       <span> </span>}<br><br>       <span> </span>extension LazyCollectionProtocol {<br>         <span> </span>func flatten() -&gt; LazyCollection&lt;FlattenCollection&lt;Self.Elements&gt;&gt;<br>       <span> </span>}<br><br>       <span> </span>extension Collection {<br>         <span> </span>func flatten() -&gt; FlattenCollection&lt;Self&gt;<br>       <span> </span>}<br><br>       <span> </span>extension BidirectionalCollection {<br>         <span> </span>func flatten() -&gt; FlattenBidirectionalCollection&lt;Self&gt;<br>       <span> </span>}<br><br>So it&#39;s not a simple one-to-one rename.<br><br>When there&#39;s no `separator` argument, will FlattenIterator perform better than JoinedIterator?<br><span><br>&gt;&gt; And what would happen to the flatMap() methods? Is flatten() a term of art?<br>&gt;&gt;<br>&gt;&gt; &lt;<a href="https://github.com/apple/swift/blob/master/stdlib/public/core/FlatMap.swift" rel="noreferrer" target="_blank">https://github.com/apple/swift/blob/master/stdlib/public/core/FlatMap.swift</a>&gt;<br>&gt;<br>&gt; I&#39;d say flatMap is more a &quot;term of art&quot; than flatten. &quot;flatten&quot; just describes literally what is being done. Frankly I&#39;m surprised it was never named flattened(). Anyway, flatMap should stay.<br><br></span>## Future directions<br><br>Will the flatMap(_:) methods also have flatMap(separator:_:) variants?<br></blockquote><div><br></div><div>That&#39;s an interesting idea. It seems to be purely additive, however, so I imagine it wouldn&#39;t happen until after Swift 3.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><font color="#888888"><br>-- Ben<br><br></font></span></blockquote></div><br></div></div><span style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-evolution mailing list</span><br style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-evolution@swift.org" style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-evolution@swift.org</a><br style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family:Helvetica;font-size:13px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></blockquote></div>