Created
April 22, 2021 09:20
-
-
Save Abhilash-Chandran/ba51e0b00499e68adc797e48ecfcf414 to your computer and use it in GitHub Desktop.
generic methods
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
void main() { | |
for (int i = 0; i < 5; i++) { | |
adder(i); | |
} | |
} | |
void adder<int>(int a){ | |
print(a+1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment