From b117438b90507e67b14e87a4c86df47aad577977 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 7 May 2019 16:05:00 +0200 Subject: [PATCH] EXISTS-POS method added #2739 --- doc/Type/Range.pod6 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/Type/Range.pod6 b/doc/Type/Range.pod6 index e40e7fd55..8fd1be5b8 100644 --- a/doc/Type/Range.pod6 +++ b/doc/Type/Range.pod6 @@ -353,6 +353,19 @@ Returns a pseudo-random value belonging to the range. say (1^..5).rand; # OUTPUT: «1.02405550417031␤» say (0.1..0.3).rand; # OUTPUT: «0.2130353370062␤» +=head2 method EXISTS-POS + +Defined as + + multi method EXISTS-POS(Range:D: int \pos) + multi method EXISTS-POS(Range:D: Int \pos) + +Returns C if C is greater or equal than zero and lower than +C. Returns C otherwise. + + say (6..10).EXISTS-POS(2) # OUTPUT: «True␤» + say (6..10).EXISTS-POS(7) # OUTPUT: «False␤» + =end pod # vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6