<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 Sep 2, 2016, at 9:55 AM, Nicholas Maccharoli via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;color:rgb(39,78,19)"><h2 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;line-height:1.25;padding-bottom:0.3em;border-bottom:1px solid rgb(238,238,238);color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",roboto,helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol"" class="">Introduction</h2><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",roboto,helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:16px;line-height:24px" class="">The aim of this proposal is to introduce <code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)" class="">clamp</code> functionality to the swift standard library. The <code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)" class="">clamp</code> function would take a value and a upper and lower bounds to <code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)" class="">clamp</code> the value to, ensuring that the return value of the function is within the range specified by the upper and lower bounds. Swift-evolution thread: <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160829/026748.html" style="box-sizing:border-box;color:rgb(64,120,192);text-decoration:none;background-color:transparent" class="">Discussion thread topic for that proposal</a></p></div></div></div></blockquote><br class=""></div><div>As others have pointed out, this is a purely additive change that is out of scope for Swift 4 stage 1. We need to keep standard library work focused on things like String.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>