Skip to content

Instantly share code, notes, and snippets.

@nddrylliog
Created August 18, 2010 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nddrylliog/533264 to your computer and use it in GitHub Desktop.
Save nddrylliog/533264 to your computer and use it in GitHub Desktop.
Number: enum {
two = 2
three
four
six = 6
}
MyEnum: enum from String {
foo = "FOO"
bar = "BAR"
cat = "CAT"
baz = "DOG"
}
some_func: func (something: String) {
something println()
}
some_other_func: func (something: Number) {
something as Int toString() println()
}
main: func {
some_func(MyEnum baz)
some_other_func(Number two)
some_other_func(Number three)
some_other_func(Number four)
some_other_func(Number six)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment