antipair
ErrorsCollection

antipair

Synthesised documentation from type/Pair

From type/Pair

See Original text in context

method antipair(Pair:D: --> Pair:D)

Returns a new Pair object with key and value exchanged.

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