RosettaCodeData/Task/Add-a-variable-to-a-class-instance-at-runtime/Raku/add-a-variable-to-a-class-instance-at-runtime-3.raku
2023-07-01 13:44:08 -04:00

5 lines
156 B
Raku

use MONKEY-TYPING;
augment class Int {
method answer { "Life, the Universe, and Everything" }
}
say 42.answer; # Life, the Universe, and Everything