-
Notifications
You must be signed in to change notification settings - Fork 303
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 #398
Comments
@geseq Do you have any updates? :) |
+1! |
The author of the PR hasn’t really responded to the change request. Happy to look into this if someone else would like to pick up |
@ganehag Let's make this happen. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like sort an array of objects based on a supplied function. Something like sort.Slice()
sorting := import("sorting")
myList := [{x:1}, {x:2},{x:3}]
sorting.sort( myList, func( i, j ){ return myList[i].x < myList[j].x }
The problem is, you can run a CompiledFunc for your UserFunc.
My workaround was to pass the name of a field to the UserFunc...
sorting.sort( myList, "x")
The text was updated successfully, but these errors were encountered: