class Point { has Num ($x, $y); method inverted () { return Point->new( x => $y, y => $x ); } }