11 lines
226 B
Text
11 lines
226 B
Text
class Thingable{ var thing; }
|
|
|
|
class Delegator{
|
|
var delegate;
|
|
fcn operation{
|
|
if (delegate) delegate.thing;
|
|
else "default implementation"
|
|
}
|
|
}
|
|
|
|
class Delegate(Thingable){ thing = "delegate implementation" }
|