December 2018
Intermediate to advanced
414 pages
10h 19m
English
Type aliases are a simple addition to the language; they let you reference simple or complex types by an alias. They support all declarations that you can imagine, from the simplest to the most complex.
The following block contains declarations for aliasing the following:
Let's see the code block; they let you:
typealias MyString = Stringtypealias Block = () -> Voidtypealias TypedBlock<T, U> = (T) -> Utypealias ReturningBlock<U> = () -> U
We could have also defined Block in the function of ReturningBlock:
typealias Block = ReturningBlock<()>
You can also ...
Read now
Unlock full access