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

C<grep> arity sensitivity is too different from C<map> #1456

Closed
p6rt opened this issue Dec 22, 2009 · 6 comments
Closed

C<grep> arity sensitivity is too different from C<map> #1456

p6rt opened this issue Dec 22, 2009 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 22, 2009

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

Searchable as RT71544$

@p6rt
Copy link
Author

p6rt commented Dec 22, 2009

From @masak

<masak``> is there any sense in having grep behave the same way as map
with respect to multiple arguments to the block?
<mberends> grep and map should be as similar as possible, principle of
least surprise
<masak``> rakudo​: say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl
<p6eval> rakudo 8dc189​: Not enough positional parameters passed; got 1
but expected 2 [...]
<masak``> so in other words, the above is a bug?
<rjbs> That looks like a bug to me.

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 15, 2012

From @bbkr

2012.10 - still broken

$ perl6 -e 'say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl'
Not enough positional parameters passed; got 1 but expected 2
  in block at -e​:1

@p6rt
Copy link
Author

p6rt commented Jul 21, 2015

From @ShimmerFairy

$ perl6 -e 'say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl'
(1, 1, 4, 4)

Works now, and there's a test in S32-list/grep.t

@p6rt
Copy link
Author

p6rt commented Sep 14, 2015

From @coke

On Tue Jul 21 09​:05​:31 2015, lue wrote​:

$ perl6 -e 'say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl'
(1, 1, 4, 4)

Works now, and there's a test in S32-list/grep.t

So, closing ticket. Thanks!

--
Will "Coke" Coleda

@p6rt p6rt closed this as completed Sep 14, 2015
@p6rt
Copy link
Author

p6rt commented Sep 14, 2015

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

@p6rt p6rt added the Bug 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