<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="">Hey Ray,<div class=""><br class=""></div><div class="">Feel free to take a look at the&nbsp;<a href="https://github.com/adrfer/Sort/tree/swift-3" class="">swift-3 branch of this repo</a>, too. There are several quick sort implementations there, from classic to Swift-y!</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">— A</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 4, 2016, at 12:02 PM, Ray Fix via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div>I filed <a href="rdar://27700622" class="">rdar://27700622</a>&nbsp;and attached a playground. &nbsp;Any workaround magic I can do here?<div class=""><div class=""><br class=""></div><div class="">func&nbsp;quickSort&lt;Element:&nbsp;Comparable&gt;(_&nbsp;input: [Element]) -&gt; [Element] {</div><div class="">&nbsp; &nbsp;&nbsp;if&nbsp;input.count&nbsp;&lt;&nbsp;2&nbsp;{<br class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;input<br class="">&nbsp; &nbsp;&nbsp;}<br class="">&nbsp; &nbsp;&nbsp;let&nbsp;pivot = input.first!<br class="">&nbsp; &nbsp;&nbsp;let&nbsp;left = input.dropFirst().filter&nbsp;{ $0&nbsp;&lt;=&nbsp;pivot }<br class="">&nbsp; &nbsp;&nbsp;let&nbsp;right = input.dropFirst().filter&nbsp;{ $0&nbsp;&gt;&nbsp;pivot }<br class=""><br class="">&nbsp; &nbsp;&nbsp;// Does not compile with (Swift 3pre) Xcode 8 b1,2,3,4<br class="">&nbsp; &nbsp;&nbsp;// Does compile with (Swift 2.2) Xcode 7.3<br class="">&nbsp; &nbsp;&nbsp;return&nbsp;quickSort(left) + [pivot] +&nbsp;quickSort(right)<br class="">}<br class=""><br class="">quickSort([3,5,1,2])</div><div class=""><br class=""></div><div class="">Error:</div><div class="">//Playground execution failed: error: quicksort.playground:11:22: error: cannot&nbsp;convert value of type '[Element]' to expected argument type '[_]'<br class="">//return quickSort(left) + [pivot] + quickSort(right)<br class="">//&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;^~~~</div></div><div class=""><br class=""></div><div class=""><br class=""></div></div>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></div></body></html>