From 9fddece5ad9be51558e574ab290fd00f8f2eb0a8 Mon Sep 17 00:00:00 2001 From: Guest0x0 Date: Mon, 25 Mar 2024 09:58:13 +0800 Subject: [PATCH] add README.md --- immutable_hashmap/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 immutable_hashmap/README.md diff --git a/immutable_hashmap/README.md b/immutable_hashmap/README.md new file mode 100644 index 000000000..29cba3f07 --- /dev/null +++ b/immutable_hashmap/README.md @@ -0,0 +1,17 @@ +This package provides an immutable hash map data structure. + +## Basic usage +``` +test { + let h = + @immutable_hashmap.empty() + .add(1, 1) + .add(2, 2) + let h2 = h.add(3, 3) + @assert.assert_eq(h.find(3), None) + @assert.assert_eq(h2.find(3), Some(3)) +} +``` + +## TODO +More API, in particular removal.