Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created March 29, 2016 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/6b5e4bdcfd45aa4879d8099ac2ac6c70 to your computer and use it in GitHub Desktop.
Save zoffixznet/6b5e4bdcfd45aa4879d8099ac2ac6c70 to your computer and use it in GitHub Desktop.
Int.^add_method('x', -> $class, $v { say $v });
constant A := Metamodel::ClassHOW.new_type( name => 'A' );
A.^add_method('x', -> $class, $v { say $v });
#A.^compose;
A.x: 'A class';
Int.x: 'Int class';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment