<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=""><div class="">Now that I think about it, `fold` is not a great name for the cata on Either, [too bad `either is taken!]. &nbsp;Rust calls it `unwrap_or`, so maybe `unwrapLeft`, `unwrap`, etc? &nbsp;Also, we’ve found some use for partial projections in JSON parsing libraries, so it might be worth looking into adding them to the proposal.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">extension<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">Either</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> fromLeft : <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">LeftValue</span>? {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span>switch<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>self<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">                </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> .Left(l):</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span>return<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> l</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span>default<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span>return<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>nil</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> fromRight : <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">RightValue</span>? {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span>switch<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>self<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">                </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">case</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> .Right(r):</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span>return<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> r</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                </span></span>default<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre">                        </span></span>return<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span>nil</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jan 9, 2016, at 2:19 PM, Developer &lt;<a href="mailto:devteam.codafi@gmail.com" class="">devteam.codafi@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Because the last discussion, while substantive and very much appreciated, did not debate the proposal much, I'd like to begin discussion anew about the addition of an Either type to the Swift Standard Library. &nbsp;The proposal can be found here (<a href="https://github.com/apple/swift-evolution/pull/67#issuecomment-170269481" class="">https://github.com/apple/swift-evolution/pull/67#issuecomment-170269481</a>) and a link to the root our previous round of discussion is here (<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001394.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001394.html</a>).<br class=""><br class="">Thanks all!<br class=""><br class="">~Robert Widmann</div></div></blockquote></div><br class=""></div></body></html>