Created
December 31, 2012 08:10
-
-
Save jaytaph/4418239 to your computer and use it in GitHub Desktop.
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
class foo { | |
public method bar(... args) { | |
for (i=0; i!=args.count(); i++) { | |
io.printf("arg %d : %s", i, args[i]); | |
} | |
} | |
public method baz(... args) { | |
self.bar(args); // This would send a list, so bar only has 1 argument | |
self.bar(... args); // maybe something like this, use the ... to tell that we are sending a varlist? | |
} | |
} | |
f = foo.new(); | |
f.bar("hello"); | |
f.bar("hello", "world"); | |
f.bar("hello", "world", 12345); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment