Releases: ts-klassen/d3trees
Releases · ts-klassen/d3trees
0.1.1
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:
-
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
.
- We have introduced the
-
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.
- Managing integer values within your tree structures is now more convenient with the
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
D3Trees 0.1.0
Initial release