Skip to content

Commit

Permalink
hint and and like to set operators from Range
Browse files Browse the repository at this point in the history
  • Loading branch information
gfldex committed May 9, 2018
1 parent 3b70e35 commit 684d1a0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/Type/Range.pod6
Expand Up @@ -69,6 +69,15 @@ It is possible to shift or scale the interval of a range:
say (1..10) - 1; # OUTPUT: «0..9␤»
say (1..10) * 2; # OUTPUT: «2..20␤»
say (1..10) / 2; # OUTPUT: «0.5..5.0␤»
=head2 Matching against Ranges
Use L<set operators|/language/setbagmix> to match against Ranges. Please note
that set operators may cast to L<Set|/type/Set> and can create heavy memory load.
say 3 ∈ [1..12]; # OUTPUT: «True␤»
say [2..3] ⊆ [1..12]; # OUTPUT: «True␤»
say (5,6,7) ⊆ [1..12]; # OUTPUT: «True␤»
=head1 Methods
Expand Down

0 comments on commit 684d1a0

Please sign in to comment.