<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="">It would be handy if Swift can support generic `typealias`s, which would probably look like this:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c32275" class="">typealias</span> Handler&lt;Element&gt; = [Element] -&gt; Void</div></div><div class=""><br class=""></div><div class="">One common way to achieve this is to define a generic `struct` and use a nested `typealias`:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #c32275" class="">struct</span> HandlerWrapper&lt;Element&gt; {</div><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #c32275" class="">typealias</span> Hander = [<span style="font-variant-ligatures: no-common-ligatures; color: #6122ae" class="">Element</span>] -&gt; <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Void</span></div><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class="">}</div></div><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class=""><div style="margin: 0px; color: rgb(83, 154, 164);" class="">HandlerWrapper<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&lt;</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">SomeType</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&gt;.</span>Hander</div></div></body></html>