Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 63 lines (46 sloc) 2.378 kb
1701cb2 Patrick R. Michaud Add Stringy role. prefix:<^> enforces numeric context. Another spectes...
pmichaud authored
1 my role Stringy { }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
2
16f22b8 Moritz Lenz avoid undef warnings in infix:<eqv>
moritz authored
3 multi sub infix:<eqv>(Stringy:D $a, Stringy:D $b) {
48a44ea Patrick R. Michaud Move &infix:<eqv> and &infix:<===> candidates into their appropriate fil...
pmichaud authored
4 $a.WHAT === $b.WHAT && ($a cmp $b) == 0
5 }
6
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
7 proto sub prefix:<~>($) is pure { * }
8 multi sub prefix:<~>(\a) { a.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
9
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
10 proto sub infix:<~>(Mu $?, Mu $?) is pure { * }
11 multi sub infix:<~>($x = '') { $x.Stringy }
12 multi sub infix:<~>(\a, \b) { a.Stringy ~ b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
13
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
14 proto sub infix:<x>(Mu $?, Mu $?) { * }
15 multi sub infix:<x>() { fail "No zero-arg meaning for infix:<x>" }
16 multi sub infix:<x>($x) { $x.Stringy }
17 multi sub infix:<x>($s, $n) { $s.Stringy x ($n.Int // 0) }
81a7e84 Patrick R. Michaud Refactor operators, add degenerate forms for reductions.
pmichaud authored
18
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
19 proto sub infix:<leg>(Mu $?, Mu $?) is pure { * }
20 multi sub infix:<leg>(\a, \b) { a.Stringy cmp b.Stringy }
81a7e84 Patrick R. Michaud Refactor operators, add degenerate forms for reductions.
pmichaud authored
21
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
22 proto sub infix:<eq>(Mu $?, Mu $?) is pure { * }
23 multi sub infix:<eq>($x?) { Bool::True }
24 multi sub infix:<eq>(\a, \b) { a.Stringy eq b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
25
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
26 proto sub infix:<ne>(Mu $?, Mu $?) is pure { * }
27 multi sub infix:<ne>($x?) { Bool::True }
28 multi sub infix:<ne>(Mu \a, Mu \b) { a !eq b }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
29
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
30 proto sub infix:<lt>(Mu $?, Mu $?) is pure { * }
31 multi sub infix:<lt>($x?) { Bool::True }
32 multi sub infix:<lt>(\a, \b) { a.Stringy lt b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
33
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
34 proto sub infix:<le>(Mu $?, Mu $?) is pure { * }
35 multi sub infix:<le>($x?) { Bool::True }
36 multi sub infix:<le>(\a, \b) { a.Stringy le b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
37
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
38 proto sub infix:<gt>(Mu $?, Mu $?) is pure { * }
39 multi sub infix:<gt>($x?) { Bool::True }
40 multi sub infix:<gt>(\a, \b) { a.Stringy gt b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
41
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
42 proto sub infix:<ge>(Mu $?, Mu $?) is pure { * }
43 multi sub infix:<ge>($x?) { Bool::True }
44 multi sub infix:<ge>(\a, \b) { a.Stringy ge b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
45
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
46 proto sub infix:<~|>(Mu $?, Mu $?) is pure { * }
47 multi sub infix:<~|>($x = '') { $x.Stringy }
48 multi sub infix:<~|>(\a, \b) { a.Stringy ~| b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
49
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
50 proto sub infix:<~^>(Mu $?, Mu $?) is pure { * }
51 multi sub infix:<~^>($x = '') { $x.Stringy }
52 multi sub infix:<~^>(\a, \b) { a.Stringy ~^ b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
53
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
54 proto sub infix:<~&>(Mu $?, Mu $?) is pure { * }
55 multi sub infix:<~&>() { fail "No zero-arg meaning for infix:<~&>" }
56 multi sub infix:<~&>($x) { $x.Stringy }
57 multi sub infix:<~&>(\a, \b) { a.Stringy ~& b.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
58
310efb2 lizmat multi -> multi sub for easier grep/ackability
lizmat authored
59 proto sub prefix:<~^>(Mu $) is pure { * }
60 multi sub prefix:<~^>(\a) { ~^ a.Stringy }
36b32d2 Patrick R. Michaud Forgot to add Stringy.pm. pmichaud--
pmichaud authored
61
45e2308 Larry Wall tired of accidentally adding tabs to setting
TimToady authored
62 # vim: ft=perl6 expandtab sw=4
Something went wrong with that request. Please try again.