Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (14 sloc) 729 Bytes
=begin pod
=TITLE enum Order
=SUBTITLE Human readable form for comparison operators.
enum Order (:Less(-1), :Same(0), :More(1));
=head1 Operators
=head2 infix cmp
multi sub infix:<cmp>(\a, \b --> Order:D)
C<cmp> will first try to compare operands as strings (via coercion to L<Stringy|/type/Stringy>), and, failing that, will try to compare numerically via the C«<=>» operator or any other type-appropriate comparison operator. See also L<the documentation for the C<cmp> operator|/routine/cmp#(Operators)_infix_cmp>.
=head2 infix <=>
multi sub infix:«<=>»(Int:D \a, Int:D \b --> Order:D)
Specialized form for Int.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
You can’t perform that action at this time.