File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,17 @@ directly the values can be whatever is required:
36
36
say +$f; # OUTPUT: «42+0i»
37
37
say ~$f; # OUTPUT: «"forty two (but complicated)"»
38
38
39
+ = head2 method Bool
40
+
41
+ Defined as:
42
+
43
+ multi method Bool(ComplexStr:D: --> Bool:D)
44
+
45
+ I < This method may be provided by the parent classes and not implemented in ComplexStr directly > .
46
+
47
+ Returns C < True > if the invocant is numerically C < ±0±0i > , otherwise returns C < True > . String portion
48
+ is not considered.
49
+
39
50
= head2 method Capture
40
51
41
52
Defined as:
Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ directly the values can be whatever is required:
35
35
say +$f; # OUTPUT: «42»
36
36
say ~$f; # OUTPUT: «"forty two"»
37
37
38
+ = head2 method Bool
39
+
40
+ Defined as:
41
+
42
+ multi method Bool(IntStr:D: --> Bool:D)
43
+
44
+ I < This method may be provided by the parent classes and not implemented in IntStr directly > .
45
+
46
+ Returns C < True > if the invocant is numerically C < 0 > , otherwise returns C < True > . String portion
47
+ is not considered.
48
+
38
49
= head2 method Int
39
50
40
51
method Int
Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ directly the values can be whatever is required:
35
35
say +$f; # OUTPUT: «42.1»
36
36
say ~$f; # OUTPUT: «"forty two and a bit"»
37
37
38
+ = head2 method Bool
39
+
40
+ Defined as:
41
+
42
+ multi method Bool(NumStr:D: --> Bool:D)
43
+
44
+ I < This method may be provided by the parent classes and not implemented in NumStr directly > .
45
+
46
+ Returns C < True > if the invocant is numerically C < ±0e0 > , otherwise returns C < True > . String portion
47
+ is not considered.
48
+
38
49
= head2 method Num
39
50
40
51
method Num
Original file line number Diff line number Diff line change @@ -35,6 +35,18 @@ directly the values can be whatever is required:
35
35
say +$f; # OUTPUT: «42.1»
36
36
say ~$f; # OUTPUT: «"forty two and a bit"»
37
37
38
+ = head2 method Bool
39
+
40
+ Defined as:
41
+
42
+ multi method Bool(RatStr:D: --> Bool:D)
43
+
44
+ I < This method may be provided by the parent classes and not implemented in RatStr directly > .
45
+
46
+ Returns C < True > if the numerator is the numeric portion is C < 0 > , otherwise returns C < True > .
47
+ This applies for C « < 0/0 > » zero-denominator L < RatStr > as well, despite C « ?< 0/0 >.Num » being
48
+ C < True > . String portion is not considered.
49
+
38
50
= head2 method Capture
39
51
40
52
Defined as:
You can’t perform that action at this time.
0 commit comments