Skip Menu |
Report information
Id: 125337
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Fri, 5 Jun 2015 20:28:55 +0300
From: Alex Jakimenko <alex.jakimenko [...]>
Subject: NaN in sequences – weirdness and the lack of laziness
To: rakudobug [...]
Download (untitled) / with headers
text/plain 305b
This is just weird:

.say for 1...NaN;

... and so on ...

Surprisingly it counts down. Maybe it should produce an error.

Also, all of these are not lazy:

my @a = 1...NaN;
my @a = 1...-Inf;
my @a = NaN...1;
my @a = Inf...0;
my @a = -Inf...0;

Any of these lines will hang.
Download (untitled) / with headers
text/plain 253b
For @LARRY: since NaNs are not comparable, sequences and ranges with NaN end points should be Failures. Is there agreement on that? IRC commentary: -- Cheers, ZZ |

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at