Skip to content

Add Tree implementation in collection package #6

Description

@glours

This is an implementation vehicle, not a user-facing type

Filed in 2021 alongside #4 and #5. Worth reconsidering: a Tree exposed as
public API is rarely what a user of a functional library reaches for — they reach
for a Map or a Set, and the tree is how those are built.

Two ways forward:

  1. Close this and fold the decision into Add a Map implementation in collection package #5. If Add a Map implementation in collection package #5 picks a balanced tree
    (rather than a HAMT), the tree exists as an unexported implementation detail.
  2. Keep it, but redefine it as a user-facing ordered structure with a stated
    purpose — ordered iteration, range queries, min/max — which a HAMT-based Map
    would not provide.

Whichever way, this should be settled before #5 starts, not after.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions