Skip to content

Instantly share code, notes, and snippets.

@mntmn
Created July 21, 2012 13:25
Show Gist options
  • Save mntmn/3155824 to your computer and use it in GitHub Desktop.
Save mntmn/3155824 to your computer and use it in GitHub Desktop.
robusta syntax 0.1
def process(t:String) {
print(t)
}
b:String = "world"
list = ["hello",b]
for (item <- list) {
process(item)
}
class Point {
x: Number
y: Number
def constructor(@x, @y) {
}
def add(p:Point) {
new Point(@x + p.x, @y + p.y)
}
def toString() {
"#{@x}:#{@y}"
}
}
point = new Point(12,13)
p2 = point.add(new Point(14,15))
print(p2.toString())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment