Skip to content

cordyceps: List::insert_sorted #187

@hawkw

Description

@hawkw

it would be nice to have a way to use cordyceps List to build a sorted structure based on a T: Ord key, perhaps using the cursor API. this would allow using List as a kind of bad (O(n)) version of a priority queue.

of course, this would require only using insert_sorted to add to the list, as it would require that the list is always kept in a sorted state. perhaps the best approach would be a wrapper type around a List that disallows the push_front API...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions