Skip to content

Commit 684d1a0

Browse files
authored
hint and and like to set operators from Range
1 parent 3b70e35 commit 684d1a0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/Type/Range.pod6

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ It is possible to shift or scale the interval of a range:
6969
say (1..10) - 1; # OUTPUT: «0..9␤»
7070
say (1..10) * 2; # OUTPUT: «2..20␤»
7171
say (1..10) / 2; # OUTPUT: «0.5..5.0␤»
72+
73+
=head2 Matching against Ranges
74+
75+
Use L<set operators|/language/setbagmix> to match against Ranges. Please note
76+
that set operators may cast to L<Set|/type/Set> and can create heavy memory load.
77+
78+
say 3 ∈ [1..12]; # OUTPUT: «True␤»
79+
say [2..3] ⊆ [1..12]; # OUTPUT: «True␤»
80+
say (5,6,7) ⊆ [1..12]; # OUTPUT: «True␤»
7281
7382
=head1 Methods
7483

0 commit comments

Comments
 (0)