Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var printerIface =
- {
- print_stdout = function( text ){ print( text ); },
- };
- var postfixPrinterIface =
- {
- print = function( this, text ){ this.print_stdout( text $ this.postfix ); },
- postfix = '[postfix]',
- };
- var questionPrinter = class( { postfix = '?' }, class( postfixPrinterIface, printerIface ) );
- questionPrinter.print( "wat" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement