Hacker News new | past | comments | ask | show | jobs | submit login

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/b0dd44b006dc44da5695b2...



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: