prefix --
Documentation for prefix --
assembled from the following types:
language documentation Operators
From Operators
(Operators) prefix --
multi sub prefix:<-->( is rw) is assoc<non>
Decrements its argument by one and returns the updated value.
my = 3;say --; # OUTPUT: «2»say ; # OUTPUT: «2»
It works by calling the pred method (for predecessor) on its argument, which gives custom types the freedom to implement their own decrement semantics.