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
Reversing, rotating, sorting fixed-dimension arrays #4815
Comments
From @AlexDanielCode: Result: It may be more complicated for multi-dimensional arrays, but reversing a But then it gets weirder: Result: Whoops! Seems like in this case there is a difference between 「reverse」 sub Let's try the same thing with 「sort」: Since 「reverse」 sub worked, we could expect 「sort」 to work as well (but Okay, that's LTA but it was somewhat expected. It is also how 「reverse」 I am kinda expecting either NYI (if sorting a multidim array will ever make It is just too inconsistent, I think. Possible solution: |
From @jnthnOn Thu Dec 03 18:14:29 2015, alex.jakimenko@gmail.com wrote:
I decided to just implement it for 1-dimensional arrays. Left it as "no you cannot" for 2 dimensions and up, since it's not clear we'll settle on a semantics for that. Similar story for rotate, which now works on single-dim.
Fixed that one now, and along the way added a load of missing tests for sub forms of things on multi-dim arrays to make sure there weren't a bunch of other inconsistencies.
This is now fixed to produce (4,5,6,15,16,17) - that is, working on the leaves. Most things (like map) already worked nicely this way in both sub or method form, but sort does some odd things to cope with the first thing it gets being a Callable.
Which was correct already, and there's no a test to make sure we don't break it.
Yeah, the sub forms wanted a look, though most of the others were in good shape already.
Pretty much did that, though instead of 2 I just implemented the missing reverse/rotate operations. :-) Tests in S09-multidim/methods.t and the newly-added S09-multidim/subs.t. |
The RT System itself - Status changed from 'new' to 'open' |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126799 (status was 'resolved')
Searchable as RT126799$
The text was updated successfully, but these errors were encountered: