3 ms·
In Perl6 <= is equivalent to ≤ say 4 ≤ 5; # True say 4 ≤ 4; # True say 4 ≤ 3; # False say 4 <= 5; # True say 4 <= 4; # True say 4 <= 3
by b2gills 7y ago
In Perl6 <= is equivalent to ≤
say 4 ≤ 5; # True
say 4 ≤ 4; # True
say 4 ≤ 3; # False
say 4 <= 5; # True
say 4 <= 4; # True
say 4 <= 3; # False
Specifically they are the exact same subroutine.
(The normal operators are just subroutines with a special name.)
say &infix:« ≤ » =:= &infix:« <= »; # True
(The =:= operator is basically the same as pointer equivalence.)
The line which creates this equivalence is the following:
my constant &infix:<≤> := &infix:«<=»;
https://github.com/rakudo/rakudo/blob/b0dd44b006dc44da5695b28c53be52a5772f08a4/src/core/Numeric.pm6#L320 https://github.com/rakudo/rakudo/blob/b0dd44b006dc44da5695b2...