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/code.gleam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/content/chapter4_standard_library/lesson03_dict_module/code.gleam (limited to 'src/content/chapter4_standard_library/lesson03_dict_module/code.gleam') diff --git a/src/content/chapter4_standard_library/lesson03_dict_module/code.gleam b/src/content/chapter4_standard_library/lesson03_dict_module/code.gleam new file mode 100644 index 0000000..02c72c0 --- /dev/null +++ b/src/content/chapter4_standard_library/lesson03_dict_module/code.gleam @@ -0,0 +1,14 @@ +import gleam/io +import gleam/dict + +pub fn main() { + let scores = dict.from_list([#("Lucy", 13), #("Drew", 15)]) + io.debug(scores) + + let scores = + scores + |> dict.insert("Bushra", 16) + |> dict.insert("Darius", 14) + |> dict.delete("Drew") + io.debug(scores) +} -- cgit v1.2.3