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

.hyper/.race.map(&f) produces an empty sequence if &f is a multi-sub #5301

Closed
p6rt opened this issue May 6, 2016 · 4 comments
Closed

.hyper/.race.map(&f) produces an empty sequence if &f is a multi-sub #5301

p6rt opened this issue May 6, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented May 6, 2016

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

Searchable as RT128084$

@p6rt
Copy link
Author

p6rt commented May 6, 2016

From @smls

  ➜ sub f ($a) { $a**2 }; say (^10).hyper.map(&f).list;
  (0 1 4 9 16 25 36 49 64 81)

  ➜ multi f ($a) { $a**2 }; say (^10).hyper.map(&f).list;
  ()

The expected behavior would be for both examples to produce the same (non-empty) list.

(This was first reported by Alexander Moquin in a comment to ticket #​126597, but I think it should have its own ticket.)

@p6rt
Copy link
Author

p6rt commented Oct 18, 2017

From @jnthn

On Fri, 06 May 2016 08​:37​:20 -0700, smls75@​gmail.com wrote​:

➜ sub f ($a) { $a**2 }; say (^10).hyper.map(&f).list;
(0 1 4 9 16 25 36 49 64 81)

➜ multi f ($a) { $a**2 }; say (^10).hyper.map(&f).list;
()

The expected behavior would be for both examples to produce the same
(non-empty) list.

(This was first reported by Alexander Moquin in a comment to ticket
#​126597, but I think it should have its own ticket.)

Fixed in new hyper/race implementation; tests in S07-hyperrace/hyper.t and S07-hyperrace/race.t.

@p6rt
Copy link
Author

p6rt commented Oct 18, 2017

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

@p6rt
Copy link
Author

p6rt commented Oct 18, 2017

@jnthn - 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