<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 May 5, 2016, at 1:03 PM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On May 4, 2016, at 5:50 PM, Chris Lattner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class="">Proposal link: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0045-scan-takewhile-dropwhile.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0045-scan-takewhile-dropwhile.md</a><br class=""><br class="">Sequence.prefix(while:) &amp; Sequence.drop(while:) - These are *accepted* as specified in revision 3 of the proposal.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I'm still a little sad we didn't go for `prefix`/`suffix` or `take`/`drop` pairs that linguistically matched.Nonetheless I'm gratified these are hopping into the language. That said, I'm going to put on my painters cap to consider selecting some exterior latex for the feature I was most looking forward to in this proposal:</div><div class=""><br class=""></div><div class="">Core team writes:</div><blockquote type="cite" class=""><div class=""><div class="">unfold(_:applying:) - This addition is *rejected* by the core team as written, but deserves more discussion in the community, and potentially could be the subject of a future proposal. &nbsp;The core team felt that the utility of this operation is high enough to be worth including in the standard library, but could not find an acceptable name for it. &nbsp;“unfold” is problematic, despite its precedence in other language, because Swift calls the corresponding operation “reduce” and not “fold”. &nbsp;No one could get excited about “unreduce”. &nbsp;&nbsp;“iterate” was also considered, but a noun is more appropriate than an verb in this case. &nbsp;Given the lack of a good name, the core team preferred to reject <b class=""><u class="">to let the community discuss it more</u></b>.</div></div></blockquote></div><br class=""><div class="">A few thoughts:</div><div class=""><br class=""></div><div class="">* I'm not sure why a noun is more appropriate than a verb. Reduce isn't a noun, prefix isn't a noun, drop isn't a noun.&nbsp;</div></div></div></blockquote><div><br class=""></div><div>I’m not a naming guru, but my understanding is that ‘reduce’ was picked because it was term of art (like map), which is what allowed the misuse of a verb.</div><br class=""></div><div>One idea that came out of the core team discussion was something like:</div><div><br class=""></div><div>&nbsp;&nbsp;&nbsp;sequence(from: 0) { $0 += 42 }<br class=""></div><div><br class=""></div><div>Since it returns a sequence.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>