Created
May 16, 2022 14:46
-
-
Save serpicokhan/affcceec77266845b2bde9dba18e0b97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef IntList = List<int>; | |
| List<int> i1=[1,2,3]; // normal way. | |
| IntList i2 = [1, 2, 3]; // Same thing but shorter and clearer. | |
| //type alias can have type parameters | |
| typedef ListMapper<X> = Map<X, List<X>>; | |
| Map<String, List<String>> m1 = {}; // normal way. | |
| ListMapper<String> m2 = {}; // Same thing but shorter and clearer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment