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

Sorting indexed list doesn't work #184

Open
kcruijss opened this issue Oct 20, 2021 · 1 comment · May be fixed by #199
Open

Sorting indexed list doesn't work #184

kcruijss opened this issue Oct 20, 2021 · 1 comment · May be fixed by #199

Comments

@kcruijss
Copy link

kcruijss commented Oct 20, 2021

When we're sorting a nested list directly from input it works fine: try it online
But when we're sorting after we've just indexed, it seems to sort based on the string we've indexed into for some reason..
Try it online to reproduce.

I came across it in this codegolf answer of mine.

@kcruijss kcruijss changed the title Sorting indexed list within loop/filter/map doesn't work Sorting indexed list doesn't work Oct 20, 2021
@monkeygroover
Copy link
Contributor

Case 1 sorts a plain iterable, case 2 sorts a lazy stream of iterable functions, seems like it doesn't apply the function before sorting.

monkeygroover added a commit to monkeygroover/05AB1E that referenced this issue Nov 28, 2022
- before sorting we need to actually resolve each of the inner functions so the sort applies to the result not the lazy stream fn

- fixes Adriandmen#184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants