The flip routine

Combined from primary sources listed below.

In class Str ( Type/Str )§

See primary docmentation in context for routine flip.

routine flip§

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

Returns the string reversed character by character.

Examples:

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

In class Cool ( Type/Cool )§

See primary docmentation in context for routine flip.

routine flip§

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␤»

In class Allomorph ( Type/Allomorph )§

See primary docmentation in context for method flip.

method flip§

method flip(Allomorph:D:)

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