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

Lazy list ACCEPTS any non-iterable #5143

Open
2colours opened this issue Dec 24, 2022 · 2 comments
Open

Lazy list ACCEPTS any non-iterable #5143

2colours opened this issue Dec 24, 2022 · 2 comments

Comments

@2colours
Copy link
Contributor

    Also: 
 for ^10 -> $i { say $i ~~ @fib } # Fib is the infinite Fibonacci sequence

is always true, but

for ^10 -> $i { say [$i] ~~ @fib }

is always false.

Originally posted by @JJ in #2468 (comment)

@2colours
Copy link
Contributor Author

For usual manners: the bug is present on Rakudo v2022.12 with language version 6.d.

@2colours
Copy link
Contributor Author

The reason of the behavior is described here: #2468 (comment)

I think this is only a matter of decision: if it's okay for a fix to just not accept any elements when the list is lazy then that's easy to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant