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

comparing a seq to a set gives "already iterated" #4975

Closed
p6rt opened this issue Jan 5, 2016 · 5 comments
Closed

comparing a seq to a set gives "already iterated" #4975

p6rt opened this issue Jan 5, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 5, 2016

Migrated from rt.perl.org#127166 (status was 'resolved')

Searchable as RT127166$

@p6rt
Copy link
Author

p6rt commented Jan 5, 2016

From @LLFourn

<one two three>.map({$_}) ~~ set(<two three one>)

This Seq has already been iterated, and its values consumed (you might
solve this by addding .cache on usages of the Seq, or by assigning the Seq
into an array)

Although this might not be a bug per-se I don't think this is a nice thing
to do to users so this ticket is to suggest that Setty.ACCEPTS can be
implemented to stop this happening.

@p6rt
Copy link
Author

p6rt commented Jan 5, 2016

From @lizmat

On 05 Jan 2016, at 09​:05, Lloyd Fournier (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Lloyd Fournier
# Please include the string​: [perl #​127166]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127166 >

<one two three>.map({$_}) ~~ set(<two three one>)

This Seq has already been iterated, and its values consumed (you might
solve this by addding .cache on usages of the Seq, or by assigning the Seq
into an array)

Although this might not be a bug per-se I don't think this is a nice thing
to do to users so this ticket is to suggest that Setty.ACCEPTS can be
implemented to stop this happening.

Fixed with d1ff735 , tests added with b774bcc , can be closed

Liz

@p6rt
Copy link
Author

p6rt commented Jan 5, 2016

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

@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

From @usev6

On Tue Jan 05 01​:11​:37 2016, elizabeth wrote​:
[...]

Fixed with d1ff735 , tests added with b774bcc , can be closed

Thanks! I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Jan 9, 2016
@p6rt
Copy link
Author

p6rt commented Jan 9, 2016

@usev6 - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant