<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<Element> = [Element] -> 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<Element> {</div><div style="margin: 0px; font-size: 18px; font-family: Menlo;" class=""> <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>] -> <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=""><</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="">>.</span>Hander</div></div></body></html>