Created
February 15, 2013 09:49
-
-
Save nddrylliog/4959426 to your computer and use it in GitHub Desktop.
Cover templates + generics = <3
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
// our stuff | |
import myarray | |
// sdk stuff | |
import structs/ArrayList | |
main: func { | |
ints := MyArray<Int> new(1) | |
ints[0] = 1 | |
ants := MyArray<Int> new(1) | |
ants[0] = 2 | |
onts := MyArray<Int> new(1) | |
onts[0] = 3 | |
list := ArrayList<MyArray<Int>> new() | |
list add(ints). add(ants). add(onts) | |
list each(|v| | |
v[0] toString() println() | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment