diff options
author | Louis Pilfold <louis@lpil.uk> | 2024-01-03 19:48:25 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-01-03 19:48:25 +0000 |
commit | 51a1fcbd0e42b25238877d3ad05d1690e8bc1553 (patch) | |
tree | 36e8f8ad1ace4874a9c7515a8d381c5616f52d46 /src/content/chapter4_standard_library/lesson03_dict_module/code.gleam | |
parent | f3eaea54080300a85e7acb63a38b0bf5f7c6b531 (diff) | |
download | tour-51a1fcbd0e42b25238877d3ad05d1690e8bc1553.tar.gz tour-51a1fcbd0e42b25238877d3ad05d1690e8bc1553.zip |
More stdlib
Diffstat (limited to 'src/content/chapter4_standard_library/lesson03_dict_module/code.gleam')
-rw-r--r-- | src/content/chapter4_standard_library/lesson03_dict_module/code.gleam | 14 |
1 files changed, 14 insertions, 0 deletions
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) +} |