i all the A langs

This commit is contained in:
Ingy döt Net 2013-04-10 14:16:51 -07:00
parent 86c034bb8b
commit 9246b988c7
245 changed files with 3941 additions and 0 deletions

View file

@ -0,0 +1,23 @@
class Delegator {
public generic delegate = none
public function operation {
if (typeof(delegate) == "none") {
return "default implementation"
}
return delegate()
}
}
function thing {
return "delegate implementation"
}
// default, no delegate
var d = new Delegator()
println (d.operation())
// delegate
var d1 = new Delegator()
d1.delegate = thing
println (d1.operation())