routine flip

Documentation for routine flip assembled from the following types:

class Str

From Str

(Str) routine flip

multi sub    flip(Str:D  --> Str:D)
multi method flip(Str:D: --> Str:D)

Returns the string reversed character by character.


"Raku".flip;  # OUTPUT: «ukaR» 
"ABBA".flip;  # OUTPUT: «ABBA»

class Cool

From Cool

(Cool) routine flip

Defined as:

sub flip(Cool $s --> Str:D)
method flip()

Coerces the invocant (or in sub form, its argument) to Str, and returns a reversed version.

say 421.flip;       # OUTPUT: «124␤»

class Allomorph

From Allomorph

(Allomorph) method flip

method flip(Allomorph:D:)

Calls Str.flip on the invocant's Str value.