method antipair

Documentation for method antipair, assembled from the following types:

class Pair

From Pair

(Pair) method antipair

Defined as:

method antipair(--> Pair:D)

Returns a new Pair object with key and value exchanged.

my $p = (6 => 'Perl').antipair;
say $p.key;         # OUTPUT: «Perl␤» 
say $p.value;       # OUTPUT: «6␤»