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
Make .min and .max work on hashes #5501
Comments
From @smlsCurrently, calling .min or .max on an non-empty Hash throws a spurious error: ➜ say {a=>3, b=>2, c=>1}.max(*.value); ➜ say {a=>3, b=>2, c=>1}.min(*.value); I think they should operate on the Hash is list context (i.e. make .max work like .list.max, and .min like .list.min). That's what other list'y methods already do when they're used on a Hash: ➜ say {a=>3, b=>2, c=>1}.grep(*.value == 3); ➜ say {a=>3, b=>2, c=>1}.sort(*.value) |
From @lizmatThis is a side effect of min/max/minmax not using an iterator approach atm. I’m looking at making the necessary modifications, but that will be later today at the soonest.
|
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatFixed with 1035edb , tests needed
|
From @zoffixznetTests added in Raku/roast@9b9c39ae08 -- |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128780 (status was 'resolved')
Searchable as RT128780$
The text was updated successfully, but these errors were encountered: