<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 08 Apr 2016, at 13:19, Haravikk via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I think it makes sense to just rename them; it’s not as though flattened or mapped is somehow far removed from the original meaning as the actual action is the same, it’s just changing tense.<br class=""></div></div></blockquote><div><br class=""></div><div>-1, and not only for the reasons we neither call trigonometric functions `<span style="font-family: Menlo; font-size: 11px;" class="">sine</span>`, `<span style="font-family: Menlo; font-size: 11px;" class="">cosine</span>`, and `<font face="Menlo" style="font-size: 11px;" class="">tangent</font>`. The existing names are widely known, commonly taught in modern introductory programming courses, to the point, and googleable.</div><div><br class=""></div><div>In addition:</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">If we want mutating forms of this methods then I much prefer .map() and .mapped() to .map() and .mapInPlace() or whatever, as the latter contradicts the naming convention used everywhere else which only adds confusion.</div></div></blockquote><div><br class=""></div><div>This idea of in-place versions is innocuous but absurd. In general, there's <i class="">no way</i> mapping `<font face="Menlo" class=""><span style="font-size: 11px;" class="">T -&gt; U</span></font>` over a `<span style="font-family: Menlo; font-size: 11px;" class="">[T]</span>` could possibly accommodate the result in the argument of type `<font face="Menlo" class=""><span style="font-size: 11px;" class="">[T]</span></font>`:</div><div><br class=""></div><div><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp; &nbsp; var xs: [Int] = ...</span></font></div><div><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp; &nbsp; xs.mapInPlace {String($0)} // ???</span></font></div><div><br class=""></div><div>And the same goes for `<font face="Menlo" class=""><span style="font-size: 11px;" class="">flatMap</span></font>`, and `<font face="Menlo" style="font-size: 11px;" class="">Optional</font>` and others. Likewise, `<font face="Menlo" class=""><span style="font-size: 11px;" class="">flatten()</span></font>` couldn't possibly happen in place because the result type has one level of nesting less than the argument.</div><br class=""></div>— Pyry</body></html>