Skip to content

0.1.1

Latest
Compare
Choose a tag to compare
@ts-klassen ts-klassen released this 08 Sep 14:36
· 2 commits to main since this release

Release Note: Version 0.1.1

We are pleased to announce the release of version 0.1.1 of the d3trees module. This update brings significant enhancements and new features to improve your tree-based data structure management in Erlang.

Key Changes in this Release:

  1. Introducing lookup/2 Function:

    • We have introduced the lookup/2 function, which enables effortless retrieval of values within your tree structures.
    • By providing a specific path, you can retrieve the associated value. If the path does not exist, the function returns none.
  2. New Function: increment/3:

    • Managing integer values within your tree structures is now more convenient with the increment/3 function.
    • This function allows you to increment the value at a specified path by providing an integer. If the node does not exist, it will be created with the provided value.

Usage Examples:

% Creating a new tree
1> Tree = d3trees:new("RootNode").
% #{name => "RootNode"}

% Example of using the lookup function
2> UpdatedTree = d3trees:upsert(["FirstNode", "SecondNode"], "SecondNodeValue", Tree).
% UpdatedTree is now the updated tree structure
3> d3trees:lookup(["FirstNode", "SecondNode"], UpdatedTree).
{value, "SecondNodeValue"}

% Example of incrementing an integer value within the tree
4> IntegerTree = d3trees:increment(["x", "y"], 10, UpdatedTree).
% IntegerTree is now the updated tree structure
5> d3trees:increment(["x", "y"], 2, IntegerTree).
% IntegerTree is updated again with the incremented value