<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><div></div><div>Hi Craig,&nbsp;</div><div><br></div><div>the following sentence is a bit misleading as it makes the feature seem a special ability on functions which accept closures which I do not think it should be.</div><div><br>Am 29.01.2016 um 07:43 schrieb Craig Cruden via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;:<br><br></div><blockquote type="cite">Any function which accepts a closure would also be able to accept a closure composed of partial functions defined using<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="">case</code>/<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="">default</code>&nbsp;syntax used in switch-case.</blockquote><br><div>I think it should be a new feature how unary closures can be written, so I would reword it a little bit:</div><div><br></div><div>"Any closure that takes one argument can be composed of ..."</div><div><br></div><div>This would make your example of using it with reduce() invalid, though, but I think this would create ambiguities with cases where the closure is actually called with a tuple as single argument anyway (similar to the problems of the current autosplatting of tuples as function arguments which Chris want's to remove because of the subtle problems this introduces). It probably would be sufficient to just use match() within the reduction closure.</div></div><div><br></div><div>I still don't like the shortened "cases" variant and would prefer to drop it or at least replace or extend the match() example with a standard variant making it look like a "real" case expression.</div><div><br></div><div>-Thorsten&nbsp;</div></body></html>