Created
March 29, 2016 23:31
-
-
Save zoffixznet/83d6b497a37a43133ad2bc8b034a0412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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