Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: nom
Fetching contributors…

Cannot retrieve contributors at this time

65 lines (48 sloc) 2.488 kb
my role Stringy { }
multi sub infix:<eqv>(Stringy:D $a, Stringy:D $b) {
$a.WHAT === $b.WHAT && ($a cmp $b) == 0
}
proto sub prefix:<~>($) is pure { * }
multi sub prefix:<~>(\a) { a.Stringy }
multi sub prefix:<~>(int $a) { nqp::p6box_s($a) }
multi sub prefix:<~>(num $a) { nqp::p6box_s($a) }
proto sub infix:<~>(Mu $?, Mu $?) is pure { * }
multi sub infix:<~>($x = '') { $x.Stringy }
multi sub infix:<~>(\a, \b) { a.Stringy ~ b.Stringy }
proto sub infix:<x>(Mu $?, Mu $?) { * }
multi sub infix:<x>() { fail "No zero-arg meaning for infix:<x>" }
multi sub infix:<x>($x) { $x.Stringy }
multi sub infix:<x>($s, $n) { $s.Stringy x ($n.Int // 0) }
proto sub infix:<leg>(Mu $?, Mu $?) is pure { * }
multi sub infix:<leg>(\a, \b) { a.Stringy cmp b.Stringy }
proto sub infix:<eq>(Mu $?, Mu $?) is pure { * }
multi sub infix:<eq>($x?) { Bool::True }
multi sub infix:<eq>(\a, \b) { a.Stringy eq b.Stringy }
proto sub infix:<ne>(Mu $?, Mu $?) is pure { * }
multi sub infix:<ne>($x?) { Bool::True }
multi sub infix:<ne>(Mu \a, Mu \b) { a !eq b }
proto sub infix:<lt>(Mu $?, Mu $?) is pure { * }
multi sub infix:<lt>($x?) { Bool::True }
multi sub infix:<lt>(\a, \b) { a.Stringy lt b.Stringy }
proto sub infix:<le>(Mu $?, Mu $?) is pure { * }
multi sub infix:<le>($x?) { Bool::True }
multi sub infix:<le>(\a, \b) { a.Stringy le b.Stringy }
proto sub infix:<gt>(Mu $?, Mu $?) is pure { * }
multi sub infix:<gt>($x?) { Bool::True }
multi sub infix:<gt>(\a, \b) { a.Stringy gt b.Stringy }
proto sub infix:<ge>(Mu $?, Mu $?) is pure { * }
multi sub infix:<ge>($x?) { Bool::True }
multi sub infix:<ge>(\a, \b) { a.Stringy ge b.Stringy }
proto sub infix:<~|>(Mu $?, Mu $?) is pure { * }
multi sub infix:<~|>($x = '') { $x.Stringy }
multi sub infix:<~|>(\a, \b) { a.Stringy ~| b.Stringy }
proto sub infix:<~^>(Mu $?, Mu $?) is pure { * }
multi sub infix:<~^>($x = '') { $x.Stringy }
multi sub infix:<~^>(\a, \b) { a.Stringy ~^ b.Stringy }
proto sub infix:<~&>(Mu $?, Mu $?) is pure { * }
multi sub infix:<~&>() { fail "No zero-arg meaning for infix:<~&>" }
multi sub infix:<~&>($x) { $x.Stringy }
multi sub infix:<~&>(\a, \b) { a.Stringy ~& b.Stringy }
proto sub prefix:<~^>(Mu $) is pure { * }
multi sub prefix:<~^>(\a) { ~^ a.Stringy }
# vim: ft=perl6 expandtab sw=4
Jump to Line
Something went wrong with that request. Please try again.