RosettaCodeData/Task/Delegates/Zkl/delegates-2.zkl

8 lines
206 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
// Without a delegate:
a:= Delegator();
a.operation().println(); //--> "default implementation"
// With a delegate:
a.delegate = Delegate();
a.operation().println(); //-->"delegate implementation"