From 51a1fcbd0e42b25238877d3ad05d1690e8bc1553 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Wed, 3 Jan 2024 19:48:25 +0000 Subject: More stdlib --- .../lesson03_dict_module/text.html | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/content/chapter4_standard_library/lesson03_dict_module/text.html (limited to 'src/content/chapter4_standard_library/lesson03_dict_module/text.html') diff --git a/src/content/chapter4_standard_library/lesson03_dict_module/text.html b/src/content/chapter4_standard_library/lesson03_dict_module/text.html new file mode 100644 index 0000000..5e60ba2 --- /dev/null +++ b/src/content/chapter4_standard_library/lesson03_dict_module/text.html @@ -0,0 +1,40 @@ +

+ The + gleam/dict + standard library module defines Gleam's Dict type and functions + for working with it. A dict is a collection of keys and values which other + languages may call a hashmap or table. +

+ +

+ new + and + new + can be used to create new dicts. +

+ +

+ insert + and + delete + are used to add and remove items from a dict. +

+

+ Like lists, dicts are immutable. Inserting or deleting an item from a dict + will return a new dict with the item added or removed. +

+

+ Dicts are unordered! If it appears that the items in a dict are in a certain + order this is incidental and should not be relied upon. Any ordering may + change without warning in future versions or on different runtimes. +

-- cgit v1.2.3