Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Created February 15, 2013 09:49
Show Gist options
  • Save nddrylliog/4959426 to your computer and use it in GitHub Desktop.
Save nddrylliog/4959426 to your computer and use it in GitHub Desktop.
Cover templates + generics = <3
// 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