<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=""><br class=""></div>Why reinvent the wheel, when the old trusty (but a bit cryptic according to some) tri-op can do the trick…<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 23 mai 2016 à 04:29, Charles Constant via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Here's a few examples of what this change would allow. <div class=""><br class=""></div><div class="">I just plucked the first instances of other people's switch statements that I found on GitHub. </div><div class=""><br class=""></div><div class="">If there were an easy way to search GitHub for chained ternary expressions, I would have added some examples of those too, since they could all be improved with this where clause + ??. <div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(194,52,155)" class="">mutating</span><span style="" class=""> </span><span style="color:rgb(194,52,155)" class="">func</span><span style="" class=""> toggle() {</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                </span></span><span style="" class="">switch</span><span style="color:rgb(255,255,255)" class=""> </span><span style="" class="">self</span><span style="color:rgb(255,255,255)" class="">{</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span></span><span style="color:rgb(194,52,155)" class="">case</span><span style="" class=""> Off:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                        </span></span><span style="color:rgb(194,52,155)" class="">self</span><span style="" class=""> = On</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span></span><span style="color:rgb(194,52,155)" class="">case</span><span style="" class=""> On:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                        </span></span><span style="color:rgb(194,52,155)" class="">self</span><span style="" class=""> = Off<span class="" style="white-space:pre">        </span></span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>}<span class="" style="white-space:pre">        </span></span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>}</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(194,52,155)" class="">mutating</span><span style="" class=""> </span><span style="color:rgb(194,52,155)" class="">func</span><span style="" class=""> toggle() {</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span></span><span style="color:rgb(194,52,155)" class="">self</span><span style="" class=""> = .On </span><span style="color:rgb(194,52,155)" class="">where</span><span style="" class=""> (</span><span style="color:rgb(194,52,155)" class="">self</span><span style="" class=""> == .Off) ?? .Off</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>}</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><br class=""><span style="" class=""></span></div></div></div></div></div></blockquote><div><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">mutating</span> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span> toggle() { <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span> = <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span> <span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">==</span> .<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">Off</span> ? .<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">On</span> : .<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">Off</span> }</div><div><br class=""></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span></span><span style="color:rgb(194,52,155)" class="">switch</span><span style="" class=""> switchNumberThree {</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span></span><span style="color:rgb(194,52,155)" class="">case</span><span style="" class=""> </span><span style="color:rgb(139,132,207)" class="">10</span><span style="" class="">, </span><span style="color:rgb(139,132,207)" class="">11</span><span style="" class="">, </span><span style="color:rgb(139,132,207)" class="">12</span><span style="" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                        </span>println(</span><span style="color:rgb(228,68,72)" class="">"It is </span><span style="" class="">\</span><span style="color:rgb(228,68,72)" class="">(</span><span style="" class="">switchNumberThree</span><span style="color:rgb(228,68,72)" class="">)"</span><span style="" class="">)</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                </span></span><span style="" class="">default</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(228, 68, 72); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                        </span>(</span><span style="" class="">"It is none of them!"</span><span style="color:rgb(255,255,255)" class="">)</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>}</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>println(</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span></span><span style="color:rgb(228,68,72)" class="">"It is </span><span style="" class="">\</span><span style="color:rgb(228,68,72)" class="">(</span><span style="" class="">switchNumberThree</span><span style="color:rgb(228,68,72)" class="">)"</span><span style="" class=""> </span><span style="color:rgb(194,52,155)" class="">where</span><span style="" class=""> </span><span style="color:rgb(139,132,207)" class="">10</span><span style="" class="">...</span><span style="color:rgb(139,132,207)" class="">12</span><span style="" class=""> ~= switchNumberThree</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(228, 68, 72); background-color: rgb(0, 30, 87);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                </span>?? </span><span style="" class="">"It is none of them!"</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>)</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><br class=""><span style="" class=""></span></div></div></div></div></blockquote><br class=""><div><div style="margin: 0px; line-height: normal;" class=""><span style="color: rgb(61, 29, 129); font-family: Menlo; font-size: 11px;" class="">print</span><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px;" class="">( </span><span style="color: rgb(39, 42, 216); font-family: Menlo; font-size: 11px;" class="">10</span><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px;" class="">...</span><span style="color: rgb(39, 42, 216); font-family: Menlo; font-size: 11px;" class="">12</span><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px;" class=""> ~= </span><font color="#4f8187" face="Menlo" class=""><span style="font-size: 11px;" class="">switchNumberThree</span></font><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px;" class=""> ? </span><span style="color: rgb(209, 47, 27); font-family: Menlo; font-size: 11px;" class="">"It is </span><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px;" class="">\</span><span style="color: rgb(209, 47, 27); font-family: Menlo; font-size: 11px;" class="">(</span><font color="#4f8187" face="Menlo" class=""><span style="font-size: 11px;" class="">switchNumberThree</span></font><span style="color: rgb(209, 47, 27); font-family: Menlo; font-size: 11px;" class="">)</span><font color="#d12f1b" face="Menlo" class=""><span style="font-size: 11px;" class="">"</span></font></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> : </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"It's none of them"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> )</span></div><div class=""><br class=""></div></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">switch</span><span style="color:rgb(255,255,255)" class=""> x {</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">case</span><span style="color:rgb(255,255,255)" class=""> </span><span style="color:rgb(139,132,207)" class="">1</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">case</span><span style="color:rgb(255,255,255)" class=""> </span><span style="color:rgb(139,132,207)" class="">2</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">case</span><span style="color:rgb(255,255,255)" class=""> </span><span style="color:rgb(139,132,207)" class="">3</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">case</span><span style="color:rgb(255,255,255)" class=""> </span><span style="color:rgb(139,132,207)" class="">4</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                </span></span><span style="" class="">fallthrough</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">case</span><span style="color:rgb(255,255,255)" class=""> </span><span style="color:rgb(139,132,207)" class="">5</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">                </span></span><span style="" class="">fallthrough</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(194, 52, 155); background-color: rgb(92, 7, 0);" class=""><span style="color:rgb(255,255,255)" class=""><span class="" style="white-space:pre">        </span></span><span style="" class="">default</span><span style="color:rgb(255,255,255)" class="">:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">                </span>j++</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>}</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(92, 7, 0); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><span style="" class=""></span><br class=""></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87);" class=""><span style="" class=""><span class="" style="white-space:pre">        </span>j = j+</span><span style="color:rgb(139,132,207)" class="">1</span><span style="" class=""> </span><span style="color:rgb(194,52,155)" class="">where</span><span style="" class=""> (</span><span style="color:rgb(139,132,207)" class="">4</span><span style="" class="">...</span><span style="color:rgb(139,132,207)" class="">5</span><span style="" class=""> ~= x) ?? j+</span><span style="color:rgb(139,132,207)" class="">2</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: 'Fantasque Sans Mono'; color: rgb(255, 255, 255); background-color: rgb(0, 30, 87); min-height: 12px;" class=""><br class=""><span style="" class=""></span></div></div></div></div></blockquote><div><br class=""></div><div>Broken conversion:</div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">j</span> += <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span>...<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span> ~= <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">x</span> ? <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span> : <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class=""><br class=""></span></div></div><div>Proper conversion:</div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">j</span> += <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span> ~= <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">x</span> ? <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">3</span> : <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">5</span> ~= <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">x</span> ? <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">2</span> : <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class=""><br class=""></span></div></div>Earlier e-mail example:</div><div><blockquote type="cite" class=""><div style="font-size: 13px;" class=""><b class=""> let foo = </b></div><div style="font-size: 13px;" class=""><b class=""> "positive" where ( bar > 0 ) ?? </b></div><div style="font-size: 13px;" class=""><b class=""> "negative" where ( bar < 0 ) ?? </b></div><div style="font-size: 13px;" class=""><b class=""> "zero"</b></div></blockquote><div class=""><div style="font-size: 13px;" class=""><b class=""><br class=""></b></div></div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> foo = <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">bar</span> > <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span> ? <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"positive"</span> :</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">bar</span> < <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span> ? <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"negative"</span> :</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"zero"</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class=""><br class=""></span></div></div><div>Dany</div></div></body></html>