Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN in sequences/ranges | weirdness and the lack of laziness #4298

Open
p6rt opened this issue Jun 5, 2015 · 3 comments
Open

NaN in sequences/ranges | weirdness and the lack of laziness #4298

p6rt opened this issue Jun 5, 2015 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 5, 2015

Migrated from rt.perl.org#125337 (status was 'open')

Searchable as RT125337$

@p6rt
Copy link
Author

p6rt commented Jun 5, 2015

From @AlexDaniel

This is just weird​:

Code​:
.say for 1...NaN;

Result​:
1
0
-1
-2
-3
-4
... 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.

@p6rt
Copy link
Author

p6rt commented Jul 22, 2016

From @zoffixznet

For @​LARRY​: since NaNs are not comparable, sequences and ranges with NaN end points should be Failures. Is there agreement on that?

IRC commentary​: http://irclog.perlgeek.de/perl6-dev/2016-07-22#i_12884778

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Jul 22, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the at_larry label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant