Skip to content

Checking Empty child of Internal nodes #59

@kgeorgiy

Description

@kgeorgiy

Documentation states that Empty allowed only as a root of the tree. Both performance and functions (e. g. binarySetOpWithKey) depends on this invariant. But, now it is not checked by tests at all.

Unfortunately, there is no way to write such check function using public API only.

AFAIU there are two ways to solve this problem:

  1. Make one of the API functions (e.g. toList) to check this. This check will cost just a one call on the root tree.
  2. Provide special check function in the API.

I think first variant is better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions