Created
July 21, 2012 13:25
-
-
Save mntmn/3155824 to your computer and use it in GitHub Desktop.
robusta syntax 0.1
This file contains 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
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