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
.polymod implementation assumes all lazy lists are infinite #5327
Comments
From @zoffixznetWhen given a lazy list as the argument, .polymod divides until the original number given by the invocant reaches zero. That works when the lazy list is infinite, but when it isn't, we lose the final remainder. This affects both the Int and Real implementations. Here's a sample program demonstrating the issue: say 42.polymod: 2, 3; |
From @jnthnOn Wed May 18 07:56:18 2016, cpan@zoffix.com wrote:
It's worth noting that Perl 6 doesn't have a concept of infinite lists (that is, doesn't try to track that or make decisions based on it). Rather, a list (or sequence) can be marked lazy (or not). So however this gets changed (if at all), it'll want to be based on deciding what to do in the lazy vs. non-lazy case. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetFixed in rakudo/rakudo@980f496fa8 Tests added in Raku/roast@61160f5640 |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128176 (status was 'resolved')
Searchable as RT128176$
The text was updated successfully, but these errors were encountered: