I'm just curious on what algorithm
[sorted V] of @list
uses
I'm just curious on what algorithm
[sorted V] of @list
uses
Whatever the Javascript library provides. So it's probably quicksort; that's what most libraries use, I think.
it's slightly more interesting than just "whatever JavaScript does", Snap's generic sorting works with any combination of first-class data. It sorts / groups them by the order
list, text, number, Boolean, color, command, reporter, predicate, costume, sound, sprite, stage, nothing, undefined
Oh, yes, I should have said that figuring what to sort on is interesting, but I took the question to be, once the sort keys are determined, what sorting algorithm do we use. And that's the question to which I think the answer is "whatever algorithm JS uses."
oh, is "nothing" its own datatype?
I would've assumed blank items were strings
same. but what jens posted, and snap error messages, I think suggest otherwise.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.