[swift-evolution] Generic `typealias`s
Dapeng Gao
gdapeng at icloud.com
Fri Dec 4 05:04:45 CST 2015
It would be handy if Swift can support generic `typealias`s, which would probably look like this:
typealias Handler<Element> = [Element] -> Void
One common way to achieve this is to define a generic `struct` and use a nested `typealias`:
struct HandlerWrapper<Element> {
typealias Hander = [Element] -> Void
}
HandlerWrapper<SomeType>.Hander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151204/86430753/attachment.html>
More information about the swift-evolution
mailing list