On 12/30/20 7:06 PM, yary wrote:
Look up ..^ which is the long form of ^ when used in ^8 sort of thing

https://docs.raku.org/routine/..$CIRCUMFLEX_ACCENT <https://docs.raku.org/routine/..$CIRCUMFLEX_ACCENT>

"Constructs a Range <https://docs.raku.org/type/Range> from the arguments, excluding the end point."

try out these
3 .. 7
3 ..^ 7
3 ^.. 7
3 ^..^ 7

Hi Yary,

   You have got to love Raku!   Thank you!

-T

> $x=4; for 3..7 -> $i { print "i = $i\n"; }
i = 3
i = 4
i = 5
i = 6
i = 7

> $x=4; for 3..^7 -> $i { print "i = $i\n"; }
i = 3
i = 4
i = 5
i = 6

> $x=4; for 3^..7 -> $i { print "i = $i\n"; }
i = 4
i = 5
i = 6
i = 7

> $x=4; for 3^..^7 -> $i { print "i = $i\n"; }
i = 4
i = 5
i = 6

Reply via email to