Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created March 29, 2016 23:31
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/83d6b497a37a43133ad2bc8b034a0412 to your computer and use it in GitHub Desktop.
Save zoffixznet/83d6b497a37a43133ad2bc8b034a0412 to your computer and use it in GitHub Desktop.
Int.^add_method('x', my method x(Int:) { say 42 });
constant A := Metamodel::ClassHOW.new_type( name => 'A' );
A.^add_method('x', my method x(A:) { say 42 });
A.^compose;
A.x;
Int.x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment