Today, we are looking precisely at the proto keyword. It gives a hint for the compiler about your intention to create multi-subs. Example 1 Consider an example of the function that either flips a string or negates an integer. multi sub f(Int $x) { return -$x; } multi sub f(Str $x) { … Continue reading “🦋1. The proto keyword in Perl 6”